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

covermerge

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

covermerge

merge user old data to default scheme

  • 1.0.7
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

covermerge

merge user old data to default scheme

最大限度保留 target 的类型,其中如果对象的 key 名字以_xxxx_格式开始的数组被认为不可变长度对象,merge 时会强制同步到和 targe 一致的长度。

usage

import covermerge from 'covermerge'

const target = {
  name: 'jake',
  age: 22,
  love: [1, 2],
  _tabs_: [0, 0],
}

const source = {
  name: 'kitty',
  age: '60',
  love: [3, 4],
  _tabs_: [1, 2, 3, 4],
}

const result = covermerge(target, source)

result = {
  name: 'kitty',
  age: 22,
  love: [3, 4],
  _tabs_: [1, 2]
}

Keywords

FAQs

Package last updated on 24 Sep 2018

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