🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@jridgewell/set-array

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jridgewell/set-array - npm Package Compare versions

Comparing version

to
1.1.0

11

dist/set-array.umd.js

@@ -17,2 +17,6 @@ (function (global, factory) {

/**
* Pops the last added item out of the SetArray.
*/
exports.pop = void 0;
/**
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the

@@ -41,2 +45,9 @@ * index of the `key` in the backing array.

};
exports.pop = (strarr) => {
const { array, _indexes: indexes } = strarr;
if (array.length === 0)
return;
const last = array.pop();
indexes[last] = undefined;
};
})();

@@ -43,0 +54,0 @@

4

dist/types/set-array.d.ts

@@ -11,2 +11,6 @@ /**

/**
* Pops the last added item out of the SetArray.
*/
export declare let pop: (strarr: SetArray) => void;
/**
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the

@@ -13,0 +17,0 @@ * index of the `key` in the backing array.

4

package.json
{
"name": "@jridgewell/set-array",
"version": "1.0.1",
"version": "1.1.0",
"description": "Like a Set, but provides the index of the `key` in the backing array",

@@ -48,2 +48,4 @@ "keywords": [],

"@rollup/plugin-typescript": "8.3.0",
"@types/mocha": "9.1.1",
"@types/node": "17.0.29",
"@typescript-eslint/eslint-plugin": "5.10.0",

@@ -50,0 +52,0 @@ "@typescript-eslint/parser": "5.10.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet