@pteromanager/collection
v1.1.0
Published
<div align="center"> <a href="https://npmjs.com/package/@pteromanager/collection" target="_blank"> <img src="https://img.shields.io/npm/v/@pteromanager/collection.svg" alt=""/> </a> <a href="https://pteromanager.ga/discord" target="_blank"> <img alt=
Downloads
6
Readme
@PteroManager/Collection
@PteroManager/Collection is an extended class the Map class. It is used to store a collection of objects.
Installation
npm i @pteromanager/collection
How to use it
const { default: Collection } = require('@pteromanager/collection');
const myCollection = new Collection();
myCollection.set('a', 1);
myCollection.set('b', 2);
myCollection.set('c', 3);
console.log(myCollection.get('a'));
// => 1
console.log(myCollection.firstKey());
// => 'a'
console.log(myCollection.firstValue());
// => 1
console.log(myCollection.lastKey());
// => 'c'
console.log(myCollection.lastValue());
// => 3
Support
You can read the documentation for more information or join our Discord Server.