Skip to content

๐Ÿ‘ท๐Ÿพ ๐Ÿ—๏ธ Made in Scotland of JavaScript

Notifications You must be signed in to change notification settings

gregtyler/girders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Girders

Build Status Coverage Status

A one-stop JavaScript shop for models. Define once, use on both client and server side, with (still to be developed!) easy integration with IndexedDB, GraphQL and REST endpoints.

Written in the latest ECMAScript for maximum readability and simplicity of use.

Quick example

const Girders = require('girders');

class Car extends Girders.Model {
  getSchema() {
    return {
      id: Number,
      name: {type: String, isRequired: true},
      doors: Number
    };
  }

  get url() {
    return `https://example.com/car/${this.username}`;
  }
}

const peugeot309 = new Car({name: 'Peugeot 309', doors: 5});

console.log(`<a href="${peugeot309.url}">${peugeot309.name}</a> has ${peugeot309.doors} doors`);

About

๐Ÿ‘ท๐Ÿพ ๐Ÿ—๏ธ Made in Scotland of JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published