![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.
@modcord/collection
Advanced tools
A Map with additional utility methods for significantly improved performance and ease-of-use.
A Map with additional utility methods to use.
If you have encountered a bug with the library, open a pull request
The Collection
extends Map
.
collection
is reffered as const collection = new Collection();
where Collection
is reffered as const Collection = require("collection-map-js").Collection;
.
// [Parameter] means that that parameter is optional, do not include []'s.
collection.filter(function); // function takes in 'value'
collection.clone(); // returns an exact same copy of current collection
collection.first([count]); // returns first x or first value of the collection
collection.firstKey([count]); // returns first x or first key of the collection
collection.array(); // array of collection values
collection.last([count]); // returns last x or first value of the collection
collection.lastKey([count]); // returns last x or first key of the collection
collection.deleteAll(); // calls delete method on all items of the collection
collection.every(function); // returns boolean, true if every item of the collection makes function returns true, function takes in 'value'
collecton.equals(collection2); // return boolean, true if collection2 and collection have a 100% key-vaue pairs matching
collection.keyArray(); // array of collection keys
collection.map(); // equal to Array.map();
collection.partition(function); // returns array of 2 collections, first collection item that passed function and second collection items that failed function ([collection1, collection2] or [passed, failed]), function takes in value
collection.random([count]); // returns array of 'count' random values from the collection, there can (and will be) duplicates (regardless of array length but more likely count represents a big portion of collection's size)
collection.randomKeys([count]); // returns array of 'count' random keys from the collection, there can (and will be) duplicates (regardless of array length but more likely count represents a big portion of collection's size)
collection.some(function); // returns true if at least 1 element of collection passed function, function takes in value
collection.find(function); // filters the collection and returns the first item value passing function, function takes in value
FAQs
A Map with additional utility methods for significantly improved performance and ease-of-use.
The npm package @modcord/collection receives a total of 2 weekly downloads. As such, @modcord/collection popularity was classified as not popular.
We found that @modcord/collection 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.