coffee-script-model
A simple wrapper over the coffee-script class with getters, setters, fields, and event bindings
npm install coffee-script-model --save
Example
Model = require 'coffee-script-model' @property 'firstName' @property 'lastName' @property 'fullName' : -> " " : namesplit ' ' @property 'username' @property 'sick'default: false person = firstName: 'bob'lastName: 'smith'consolelog personfullName# 'bob smith' person.fullName = 'thomas vi'consolelog personfirstName# 'thomas'
See example.coffee for more examples.
Supports
- Node
- Modern browsers
- IE 9+