Socket
Book a DemoInstallSign in
Socket

dynamic-multikey-map

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamic-multikey-map

[![badge](https://img.shields.io/npm/v/dynamic-multikey-map)](https://www.npmjs.com/package/dynamic-multikey-map) [![badge](https://img.shields.io/bundlephobia/min/dynamic-multikey-map)](https://bundlephobia.com/package/dynamic-multikey-map) ![badge](http

1.0.1
latest
npmnpm
Version published
Maintainers
1
Created
Source

dynamic-multikey-map

badge badge badge

This is a dynamic multiple key map to map a single object to multiple dynamic values.

Usage

import { MultiKeyMap } from "dynamic-multikey-map";

type ValueType = {
  username: string;
  ssn: string;
};

const map = new MultiKeyMap<ValueType, string>([
  (value: ValueType) => value.ssn,
  (value: ValueType) => value.username,
]);

map.add({
  username: "john.doe",
  ssn: "123-45-6789",
});

expect(map.get("john.doe")).toEqual(map.get("123-45-6789"));

FAQs

Package last updated on 07 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.