New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@discordjs/collection

Package Overview
Dependencies
Maintainers
3
Versions
1262
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@discordjs/collection - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

46

dist/index.d.ts

@@ -12,2 +12,3 @@ export interface CollectionConstructor {

* @extends {Map}
* @property {number} size - The amount of elements in this collection.
*/

@@ -20,5 +21,38 @@ declare class Collection<K, V> extends Map<K, V> {

constructor(entries?: ReadonlyArray<readonly [K, V]> | null);
/**
* Identical to [Map.get()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get).
* Gets an element with the specified key, and returns its value, or `undefined` if the element does not exist.
* @param {*} key - The key to get from this collection
* @returns {* | undefined}
*/
get(key: K): V | undefined;
/**
* Identical to [Map.set()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set).
* Sets a new element in the collection with the specified key and value.
* @param {*} key - The key of the element to add
* @param {*} value - The value of the element to add
* @returns {Collection}
*/
set(key: K, value: V): this;
/**
* Identical to [Map.has()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has).
* Checks if an element exists in the collection.
* @param {*} key - The key of the element to check for
* @returns {boolean} `true` if the element exists, `false` if it does not exist.
*/
has(key: K): boolean;
/**
* Identical to [Map.delete()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete).
* Deletes an element from the collection.
* @param {*} key - The key to delete from the collection
* @returns {boolean} `true` if the element was removed, `false` if the element does not exist.
*/
delete(key: K): boolean;
/**
* Identical to [Map.clear()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear).
* Removes all elements from the collection.
* @returns {undefined}
*/
clear(): void;
/**
* Creates an ordered array of the values of this collection, and caches it internally. The array will only be

@@ -114,3 +148,3 @@ * reconstructed if an item is added to or removed from the collection, or if you change the length of the array

/**
* Removes entries that satisfy the provided filter function.
* Removes items that satisfy the provided filter function.
* @param {Function} fn Function used to test (should return a boolean)

@@ -245,3 +279,3 @@ * @param {*} [thisArg] Value to use as `this` when executing function

/**
* Checks if this collection shares identical key-value pairings with another.
* Checks if this collection shares identical items with another.
* This is different to checking for equality using equal-signs, because

@@ -254,3 +288,3 @@ * the collections may be different objects, but contain the same data.

/**
* The sort method sorts the elements of a collection in place and returns it.
* The sort method sorts the items of a collection in place and returns it.
* The sort is not necessarily stable. The default sort order is according to string Unicode code points.

@@ -265,3 +299,3 @@ * @param {Function} [compareFunction] Specifies a function that defines the sort order.

/**
* The intersect method returns a new structure of the elements that are contained in both structures.
* The intersect method returns a new structure containing items where the keys are present in both original structures.
* @param {Collection} other The other Collection to filter against

@@ -272,3 +306,3 @@ * @returns {Collection}

/**
* The difference method returns a new structure of the elements that are contained in one structure but not the other.
* The difference method returns a new structure containing items where the key is present in one of the original structures but not the other.
* @param {Collection} other The other Collection to filter against

@@ -279,3 +313,3 @@ * @returns {Collection}

/**
* The sorted method sorts the elements of a collection and returns it.
* The sorted method sorts the items of a collection and returns it.
* The sort is not necessarily stable. The default sort order is according to string Unicode code points.

@@ -282,0 +316,0 @@ * @param {Function} [compareFunction] Specifies a function that defines the sort order.

24

package.json
{
"name": "@discordjs/collection",
"version": "0.1.4",
"version": "0.1.5",
"description": "Utility data structure used in Discord.js",

@@ -32,15 +32,15 @@ "main": "dist/index.js",

"devDependencies": {
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/preset-typescript": "^7.3.3",
"@types/node": "^10.14.17",
"@typescript-eslint/eslint-plugin": "^2.1.0",
"@typescript-eslint/parser": "^2.1.0",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.8.4",
"@babel/preset-env": "^7.8.4",
"@babel/preset-typescript": "^7.8.3",
"@types/node": "^13.7.4",
"@typescript-eslint/eslint-plugin": "^2.21.0",
"@typescript-eslint/parser": "^2.21.0",
"discord.js-docgen": "discordjs/docgen#ts-patch",
"eslint": "^6.3.0",
"eslint-config-marine": "^4.2.1",
"eslint": "^6.8.0",
"eslint-config-marine": "^6.0.0",
"jsdoc-babel": "^0.5.0",
"rimraf": "^3.0.0",
"typescript": "^3.6.2"
"rimraf": "^3.0.2",
"typescript": "^3.8.2"
},

@@ -47,0 +47,0 @@ "eslintConfig": {

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc