Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

map-extend

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

map-extend

Extend a Map instance with one or more others.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
157
decreased by-18.23%
Maintainers
1
Weekly downloads
 
Created
Source

map-extend

Extend a Map instance with one or more others.

Installation

$ npm install map-extend

Status

Stable

Actions Status

Usage

const extend = require('map-extend')

// shallow merge
extend(map, ...maps) // merge map entries in `maps` into `map`

// merge entry values in `maps` before merging into `map`
extend(true, map, ...maps)

API

extend([merge = false], map, ...maps)

Extend a Map instance with one or more other maps where merge is a boolean (default: false) used to indicate if the entry values for each candidate found in maps should be merged before extending map. If true the extend() module function is used with deep set to true on the entry values in the order in which they are given.

// copy entries from `maps` into `map`
extend(map, ...maps)

// copy and merge entry values in `maps` into `map`
extend(true, map, ...maps)

License

MIT

Keywords

FAQs

Package last updated on 17 Nov 2019

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