New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

coffee-script-model

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffee-script-model

A simple wrapper over the coffee-script class with getters, setters, fields, and event bindings

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
15
1400%
Maintainers
1
Weekly downloads
 
Created
Source

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'

class Person extends Model
  @property 'firstName'
  @property 'lastName'
  @property 'fullName',
    get: -> "#{@firstName} #{@lastName}"
    set: (name) -> [@firstName, @lastName] = name.split ' '
  @property 'username'
  @property 'sick', default: false

person = new Person firstName: 'bob', lastName: 'smith'
console.log person.fullName
# 'bob smith'

person.fullName = 'thomas vi'
console.log person.firstName
# 'thomas'

See example.coffee for more examples.

Supports

  • Node
  • Modern browsers
  • IE 9+

Keywords

coffee

FAQs

Package last updated on 01 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts