0.0.14 • Published 4 years ago

at.property v0.0.14

Weekly downloads
2
License
MulanPSL-2.0
Repository
github
Last release
4 years ago

Object.defineProperty for coffeescript

install

npm install at.property

use

require 'at.property'

class Person
  constructor: (@firstName, @lastName) ->

  @property(
    name:
      get: -> "#{@firstName} #{@lastName}"
      set: (name) -> [@firstName, @lastName] = name.split ' '
  )

code

Function::property = (dict) ->
  for attr of dict
    Object.defineProperty @::, attr, dict[attr]
0.0.14

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.9

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago