immutable and typed js data structures
Install the module with: npm install immutato
var i = require('immutato');
var Person = i.struct('Person', {
name: i.String,
age: i.Number
});
var me = Person({name:'Andrea', age:38}); //ok
var him = Person({name:12, age:38}); //throws
- Immutable data structure
- Set method to create a new immutable object with updated data
- Idempotent types
- Optional new
- Predefined types for primitives, structures, list, enums
- Retain type information at runtime
- Minimize object copy using prototype chain.
- documentation - maybe I will add documentation if you ask it. open an issue for this.
- support - open an issue here.
MIT © 2014, Andrea Parodi