Skip to content

jkroso/alias-property

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alias-property

create robust aliases for an object's properties

Installation

With packin or component

$ packin add jkroso/alias-property

then 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; // => 3

Running the tests

Just run make and navigate your browser to the test directory.

About

create robust aliases for an object's properties

Resources

License

Stars

Watchers

Forks

Packages

No packages published