![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
datamap-interface
Advanced tools
A simple interface for a map functioning as a database.
npm:
$ npm install datamap-interface
Component.js:
$ component install wooorm/datamap-interface
Component.js:
$ bower install datamap-interface
var DatamapInterface = require('datamap-interface'),
animals;
animals = new DatamapInterface({
'shark' : 'fish',
'tuna' : 'fish',
'colugo' : 'mammal',
'human' : 'mammal'
});
animals.get('human'); // 'mammal'
animals.get('unicorn'); // null
animals.add('unicorn', 'mammal');
animals.get('unicorn'); // 'mammal'
animals.remove('unicorn');
animals.has('unicorn'); // false
datamap-interface exports a constructor, which can be passed an object.
var DatamapInterface = require('datamap-interface'),
fish;
animals = new DatamapInterface({
'unicorn' : 'mystical creature',
'shark' : 'fish',
'tuna' : 'fish',
'colugo' : 'mammal',
'human' : 'mammal'
});
The following functions are available on the instance:
animals.has('unicorn'); // true
animals.has('rainbow'); // false
Returns whether (true
) or not (false
) a key
is in the map.
animals.get('unicorn'); // 'mystical creature'
animals.get('rainbow'); // null
Gets the value for key
in map, or null
.
animals.add('giant grouper', 'fish');
animals.add({
'dragon' : 'mystical creature'
});
Either adds the key/value pair to the map, or every key/value pair in the first argument.
animals.remove(['giant grouper', 'human']);
animals.remove('dragon');
Removes keys
or every key in keys
.
Given values are NOT validated; no error is thrown when non-existent values are removed.
animals.all();
/* {
* 'shark' : 'fish',
* 'tuna' : 'fish',
* 'colugo' : 'mammal',
* 'unicorn' : 'mystical creature'
* }
*/
Return the values (as an Object) in the internal database.
MIT © Titus Wormer
FAQs
Legacy package (use `Map`)
The npm package datamap-interface receives a total of 20 weekly downloads. As such, datamap-interface popularity was classified as not popular.
We found that datamap-interface demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.