Create javascript models easily using JSON
not much to see here right now
MIT
coffeescript
Examples are in coffeescript right now.
class Vendor extends Mash.Model
hasMany: -> [
Product
]
fullName: ->
this.name + ' : ' + this.address
class Product extends Mash.Model
belongsTo: -> [
Vendor
]
fullPrice: ->
this.quantity * this.unit_price
product = new Product()
product.json jsonText
console.log product.vendor.fullName()
vendor = new Vendor()
vendor.json jsonText
console.log vendor.products[0].fullPrice()