Socket
Socket
Sign inDemoInstall

umap

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

umap

The smallest, yet common, Map and WeakMap utility ever


Version published
Weekly downloads
5.9K
decreased by-22.91%
Maintainers
1
Weekly downloads
 
Created
Source

µmap

Build Status Coverage Status

The smallest, yet common, Map and WeakMap utility ever.

import umap  from 'umap';

const map = umap(new Map);
console.assert(
  (map.get(1) || map.set(1, Math.random())) ===
  (map.get(1) || map.set(1, Math.random())),
  'the most common pattern ever I have with Map instances'
);

const weakMap = umap(new WeakMap);
console.assert(
  (weakMap.get(map) || weakMap.set(map, Math.random())) ===
  (weakMap.get(map) || weakMap.set(map, Math.random())),
  'which also I use a lot with WeakMap instances'
);

Keywords

FAQs

Package last updated on 13 Mar 2020

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

  • 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