-
Notifications
You must be signed in to change notification settings - Fork 1
tobsn/flexihash.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
var flexihash = require('./flexihash'); var flexi = new flexihash(); // bulk add flexi.addTargets( ['cache-1', 'cache-2', 'cache-3'] ); // simple lookup flexi.lookup( 'object-a' ); // "cache-1" flexi.lookup( 'object-b' ); // "cache-2" // add and remove flexi.addTarget( 'cache-4' ).removeTarget( 'cache-1' ); // lookup with next-best fallback (for redundant writes) flexi.lookupList( 'object', 2 ); // ["cache-2", "cache-4"] // remove cache-2, expect object to hash to cache-4 flexi.removeTarget( 'cache-2' ); flexi.lookup( 'object' ); // "cache-4"
About
flexihash for node.js
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published