Skip to content

A datastructure which allows you to use any Javascript value as a key. Keys can be Objects, Functions, Numbers, Strings.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

isabella232/lookups

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

lookups

experimental

A datastructure which allows you to use any Javascript value as a key. Keys can be Objects, Functions, Numbers, Strings.

Usage

NPM

Example:

var lookups = require( 'lookups' );

var keyObject = { 'something': 'someValue' };
var keyFunction = function() {};
var keyString = 'something';
var keyNumber = 123;
var keyFunction2 = function() {};

var collection = new lookups( 
  
  keyObject, true,
  keyFunction, 123,
  keyString, {},
  keyNumber, 'hell world'
);

collection.set( keyFunction2, 'something new' ); // will return 'something new'
collection.get( keyObject ); // will return the object { 'something': 'someValue' }
collection.remove( keyString ); // will delete and return 'something'

License

MIT, see LICENSE.md for details.

About

A datastructure which allows you to use any Javascript value as a key. Keys can be Objects, Functions, Numbers, Strings.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%