0.1.2 • Published 7 years ago

girders v0.1.2

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

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`);
0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago