New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

join-maps

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

join-maps

Concatenates multiple Maps into one Map.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

join-maps

Requires Node 4.x or newer

npm install join-maps

Concatenates multiple Maps into one Map. Duplicate values are overriden with each successive map.

import joinMaps from 'join-maps'

const A = new Map([
    [1, 'one'],
    [2, 'two'],
    [3, 'three']
])

const B = new Map([
    [3, 'could be 3'],
    [4, 'four']
])

const C = new Map([
    [5, 'five'],
    [3, 'not really 3']
])

const D = joinMaps(A, B, C)

/*
    D is now Map {
      1 => 'one',
      2 => 'two',
      3 => 'not really 3',
      4 => 'four',
      5 => 'five'
    }
 */

Keywords

concat

FAQs

Package last updated on 08 Feb 2016

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