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

many-keys-map

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

many-keys-map - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

license

25

index.js

@@ -11,2 +11,7 @@ 'use strict';

let keyCounter = 0;
function checkKeys(keys) {
if (!Array.isArray(keys)) {
throw new TypeError('The keys parameter must be an array');
}
}

@@ -76,6 +81,3 @@ module.exports = class ManyKeysMap extends Map {

set(keys, value) {
if (!Array.isArray(keys)) {
throw new TypeError('The keys parameter must be an array');
}
checkKeys(keys);
const {publicKey} = this[getInternalKeys](keys, true);

@@ -86,6 +88,3 @@ return super.set(publicKey, value);

get(keys) {
if (!Array.isArray(keys)) {
throw new TypeError('The keys parameter must be an array');
}
checkKeys(keys);
const {publicKey} = this[getInternalKeys](keys);

@@ -96,6 +95,3 @@ return super.get(publicKey);

has(keys) {
if (!Array.isArray(keys)) {
throw new TypeError('The keys parameter must be an array');
}
checkKeys(keys);
const {publicKey} = this[getInternalKeys](keys);

@@ -106,6 +102,3 @@ return super.has(publicKey);

delete(keys) {
if (!Array.isArray(keys)) {
throw new TypeError('The keys parameter must be an array');
}
checkKeys(keys);
const {publicKey, privateKey} = this[getInternalKeys](keys);

@@ -112,0 +105,0 @@ return Boolean(publicKey && super.delete(publicKey) && this[publicKeys].delete(privateKey));

{
"name": "many-keys-map",
"version": "1.0.0",
"description": "",
"version": "1.0.1",
"description": "A `Map` subclass with support for multiple keys for one entry.",
"license": "MIT",
"repository": "bfred-it/many-keys-map",
"author": "Federico Brigante <github@bfred.it> (bfred.it)",
"keywords": [],
"keywords": [
"multiple",
"keys",
"map",
"multimap",
"multi",
"key",
"many",
"any"
],
"files": [

@@ -10,0 +19,0 @@ "index.js"

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