Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

boneskull/node-integrity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

integrity

Maintain referential integrity between JS objects

Warning

WIP

Example

General idea:

var integrity = require('integrity');

// init empty object with a "bar" property.
// updates to this property will cascade to any referencing objects.
var foo = integrity('bar', {
  update: 'cascade'
});
foo.bar === undefined; // true

// init some other object
var baz = {};

// baz.quux will now reference foo.bar
foo.$join.bar(baz, 'quux');
baz.quux === undefined; // true

// set foo.bar to some value
foo.bar = 1;

baz.quux === foo.bar; // true

Author

Christopher Hiller

License

MIT

About

Maintain referential integrity in memory

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages