Skip to content

sekur/data-synth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

data-synth

Dynamic data model synthesizer that can represent hierarchical data structures with dynamic getter/setter interfaces, data normalizers, validators, serializers with flexible class extensions using Meta data class objects for node.

NPM Version NPM Downloads

Installation

$ npm install data-synth

Basic Usage

DS = require 'data-synth'

class Song extends DS.Model
  @name: @attr 'string'
  
class MusicLibrary extends DS.Model
  @songs: @hasMany Song

music = new MusicLibrary
music.set 'songs', [ (new Song name: 'November Rain') ]
music.serialize()

Advanced Usage

For advanced usage examples, be sure to check out yangforge where data-synth is utilized for metacompilation of YANG schemas to auto-generate runtime data model instances, which in turn enables auto-generation of various interfaces (such as CLI, HTTP/REST/JSON, etc.)

Literate Coffeescript Documentation

Container Entities

Property Entities

Other Entities

License

MIT

About

Dynamic data model synthesizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published