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
2
Versions
1263
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.8.0-dev.1656590635-525bf03 to 0.8.0-dev.1656634296-819a1fd

97

dist/index.d.ts

@@ -31,4 +31,4 @@ /**

*
* @param key The key to get if it exists, or set otherwise
* @param defaultValueGenerator A function that generates the default value
* @param key - The key to get if it exists, or set otherwise
* @param defaultValueGenerator - A function that generates the default value
*

@@ -58,3 +58,3 @@ * @example

*
* @param amount Amount of values to obtain from the beginning
* @param amount - Amount of values to obtain from the beginning
*

@@ -68,3 +68,3 @@ * @returns A single value if no amount is provided or an array of values, starting from the end if amount is negative

*
* @param amount Amount of keys to obtain from the beginning
* @param amount - Amount of keys to obtain from the beginning
*

@@ -79,3 +79,3 @@ * @returns A single key if no amount is provided or an array of keys, starting from the end if

*
* @param amount Amount of values to obtain from the end
* @param amount - Amount of values to obtain from the end
*

@@ -90,3 +90,3 @@ * @returns A single value if no amount is provided or an array of values, starting from the start if

*
* @param amount Amount of keys to obtain from the end
* @param amount - Amount of keys to obtain from the end
*

@@ -103,3 +103,3 @@ * @returns A single key if no amount is provided or an array of keys, starting from the start if

*
* @param index The index of the element to obtain
* @param index - The index of the element to obtain
*/

@@ -112,3 +112,3 @@ at(index: number): V | undefined;

*
* @param index The index of the key to obtain
* @param index - The index of the key to obtain
*/

@@ -119,3 +119,3 @@ keyAt(index: number): K | undefined;

*
* @param amount Amount of values to obtain randomly
* @param amount - Amount of values to obtain randomly
*

@@ -129,3 +129,3 @@ * @returns A single value if no amount is provided or an array of values

*
* @param amount Amount of keys to obtain randomly
* @param amount - Amount of keys to obtain randomly
*

@@ -148,4 +148,4 @@ * @returns A single key if no amount is provided or an array

*
* @param fn The function to test with (should return boolean)
* @param thisArg Value to use as `this` when executing function
* @param fn - The function to test with (should return boolean)
* @param thisArg - Value to use as `this` when executing function
*

@@ -164,4 +164,4 @@ * @example

*
* @param fn The function to test with (should return boolean)
* @param thisArg Value to use as `this` when executing function
* @param fn - The function to test with (should return boolean)
* @param thisArg - Value to use as `this` when executing function
*

@@ -178,4 +178,4 @@ * @example

*
* @param fn Function used to test (should return a boolean)
* @param thisArg Value to use as `this` when executing function
* @param fn - Function used to test (should return a boolean)
* @param thisArg - Value to use as `this` when executing function
*

@@ -191,4 +191,4 @@ * @returns The number of removed entries

*
* @param fn The function to test with (should return boolean)
* @param thisArg Value to use as `this` when executing function
* @param fn - The function to test with (should return boolean)
* @param thisArg - Value to use as `this` when executing function
*

@@ -208,4 +208,4 @@ * @example

*
* @param fn Function used to test (should return a boolean)
* @param thisArg Value to use as `this` when executing function
* @param fn - Function used to test (should return a boolean)
* @param thisArg - Value to use as `this` when executing function
*

@@ -225,4 +225,4 @@ * @example

*
* @param fn Function that produces a new Collection
* @param thisArg Value to use as `this` when executing function
* @param fn - Function that produces a new Collection
* @param thisArg - Value to use as `this` when executing function
*

@@ -238,4 +238,4 @@ * @example

*
* @param fn Function that produces an element of the new array, taking three arguments
* @param thisArg Value to use as `this` when executing function
* @param fn - Function that produces an element of the new array, taking three arguments
* @param thisArg - Value to use as `this` when executing function
*

@@ -251,4 +251,4 @@ * @example

*
* @param fn Function that produces an element of the new collection, taking three arguments
* @param thisArg Value to use as `this` when executing function
* @param fn - Function that produces an element of the new collection, taking three arguments
* @param thisArg - Value to use as `this` when executing function
*

@@ -264,4 +264,4 @@ * @example

*
* @param fn Function used to test (should return a boolean)
* @param thisArg Value to use as `this` when executing function
* @param fn - Function used to test (should return a boolean)
* @param thisArg - Value to use as `this` when executing function
*

@@ -277,4 +277,4 @@ * @example

*
* @param fn Function used to test (should return a boolean)
* @param thisArg Value to use as `this` when executing function
* @param fn - Function used to test (should return a boolean)
* @param thisArg - Value to use as `this` when executing function
*

@@ -294,5 +294,5 @@ * @example

*
* @param fn Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,
* @param fn - Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,
* and `collection`
* @param initialValue Starting value for the accumulator
* @param initialValue - Starting value for the accumulator
*

@@ -308,4 +308,4 @@ * @example

*
* @param fn Function to execute for each element
* @param thisArg Value to use as `this` when executing function
* @param fn - Function to execute for each element
* @param thisArg - Value to use as `this` when executing function
*

@@ -323,4 +323,4 @@ * @example

*
* @param fn Function to execute
* @param thisArg Value to use as `this` when executing function
* @param fn - Function to execute
* @param thisArg - Value to use as `this` when executing function
*

@@ -345,3 +345,3 @@ * @example

*
* @param collections Collections to merge
* @param collections - Collections to merge
*

@@ -357,3 +357,3 @@ * @example

*
* @param collection Collection to compare with
* @param collection - Collection to compare with
*

@@ -368,3 +368,3 @@ * @returns Whether the collections have identical contents

*
* @param compareFunction Specifies a function that defines the sort order.
* @param compareFunction - Specifies a function that defines the sort order.
* If omitted, the collection is sorted according to each character's Unicode code point value, according to the string conversion of each element.

@@ -379,3 +379,3 @@ *

*
* @param other The other Collection to filter against
* @param other - The other Collection to filter against
*/

@@ -386,3 +386,3 @@ intersect<T>(other: ReadonlyCollection<K, T>): Collection<K, T>;

*
* @param other The other Collection to filter against
* @param other - The other Collection to filter against
*/

@@ -392,6 +392,6 @@ difference<T>(other: ReadonlyCollection<K, T>): Collection<K, V | T>;

* Merges two Collections together into a new Collection.
* @param other The other Collection to merge with
* @param whenInSelf Function getting the result if the entry only exists in this Collection
* @param whenInOther Function getting the result if the entry only exists in the other Collection
* @param whenInBoth Function getting the result if the entry exists in both Collections
* @param other - The other Collection to merge with
* @param whenInSelf - Function getting the result if the entry only exists in this Collection
* @param whenInOther - Function getting the result if the entry only exists in the other Collection
* @param whenInBoth - Function getting the result if the entry exists in both Collections
*

@@ -422,3 +422,3 @@ * @example

*
* @param compareFunction Specifies a function that defines the sort order.
* @param compareFunction - Specifies a function that defines the sort order.
* If omitted, the collection is sorted according to each character's Unicode code point value,

@@ -435,5 +435,6 @@ * according to the string conversion of each element.

* Creates a Collection from a list of entries.
* @param entries The list of entries
* @param combine Function to combine an existing entry with a new one
*
* @param entries - The list of entries
* @param combine - Function to combine an existing entry with a new one
*
* @example

@@ -440,0 +441,0 @@ * Collection.combineEntries([["a", 1], ["b", 2], ["a", 2]], (x, y) => x + y);

{
"name": "@discordjs/collection",
"version": "0.8.0-dev.1656590635-525bf03",
"version": "0.8.0-dev.1656634296-819a1fd",
"description": "Utility data structure used in discord.js",

@@ -9,3 +9,3 @@ "scripts": {

"format": "prettier --cache --write . && eslint src __tests__ --ext mjs,js,ts --fix --cache",
"docs": "docgen -i src/index.ts -c docs/index.json -o docs/docs.json --typescript",
"docs": "docgen -i src/index.ts -c docs/index.json -o docs/docs.json --typescript && api-extractor run --local",
"prepack": "yarn build && yarn lint",

@@ -55,2 +55,3 @@ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/collection/*'",

"@favware/cliff-jumper": "^1.8.3",
"@microsoft/api-extractor": "^7.28.2",
"@types/node": "^18.0.0",

@@ -57,0 +58,0 @@ "eslint": "^8.18.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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