0.1.0 • Published 12 years ago
alias-property v0.1.0
alias-property
create robust aliases for an object's properties
Installation
$ packin add jkroso/alias-propertythen in your app:
var alias = require('alias-property')API
alias(obj, to, from)
create an alias from from to to
var obj = {a:1}
alias(obj, 'a', 'b')
obj.a // => 1
obj.b // => 1
obj.b = 2
obj.a // => 2
obj.b // => 2
obj.a = 3
obj.a // => 3
obj.b // => 3Running the tests
Just run make and navigate your browser to the test directory.
0.1.0
12 years ago