All Projects → yeikos → Js.merge

yeikos / Js.merge

Licence: mit

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Labels

Projects that are alternatives of or similar to Js.merge

Github Clone All
Clone (~1000) repos matched to query on GitHub using Search API
Stars: ✭ 45 (-70.97%)
Mutual labels:  clone
Julius
An open source re-implementation of Caesar III
Stars: ✭ 1,353 (+772.9%)
Mutual labels:  clone
Openage
Free (as in freedom) open source clone of the Age of Empires II engine 🚀
Stars: ✭ 10,712 (+6810.97%)
Mutual labels:  clone
Learn Objective C In 24 Days Clone
This project was created with the intention of preservation
Stars: ✭ 54 (-65.16%)
Mutual labels:  clone
Gitcache
When clone from github.com, build mirror cache to improve clone speed
Stars: ✭ 77 (-50.32%)
Mutual labels:  clone
Pakcrack
All in 1 Pakisthani Facebook Cloner [ 7/8/9/10/11 DIGIT ]
Stars: ✭ 105 (-32.26%)
Mutual labels:  clone
Deepcopy
Create deep copies (clones) of your objects
Stars: ✭ 8,089 (+5118.71%)
Mutual labels:  clone
Git Clone Init
Automatic setup of user identity (user.email / user.name) on git clone
Stars: ✭ 130 (-16.13%)
Mutual labels:  clone
React Native Shared Element
Native shared element transition "primitives" for react-native 💫
Stars: ✭ 1,294 (+734.84%)
Mutual labels:  clone
Dna.js
🧬 An uncomplicated user interface library for building data-driven semantic templates
Stars: ✭ 114 (-26.45%)
Mutual labels:  clone
Flutterwhatsappclone
Building a WhatsApp Clone in Flutter.
Stars: ✭ 1,107 (+614.19%)
Mutual labels:  clone
Ezio
BT-based Disk Deployment tool
Stars: ✭ 77 (-50.32%)
Mutual labels:  clone
Rails Hackernews Reddit Producthunt Clone
hacker news / reddit / social link-sharing website. Built with Rails.
Stars: ✭ 107 (-30.97%)
Mutual labels:  clone
Opentomb
An open-source Tomb Raider 1-5 engine remake
Stars: ✭ 1,035 (+567.74%)
Mutual labels:  clone
Discord Guild Copy
A script to copy a discord guild/server
Stars: ✭ 127 (-18.06%)
Mutual labels:  clone
Clash Royale Clone
A Unity clone of Supercell's Clash of Clans spin-off mobile game Clash Royale with possibly some twists.
Stars: ✭ 43 (-72.26%)
Mutual labels:  clone
Mclone
mclone - 麻麻再也不用担心拉取GitHub代码慢了
Stars: ✭ 104 (-32.9%)
Mutual labels:  clone
Voicememosclone
A clone for Apple's Voice Memos app.
Stars: ✭ 132 (-14.84%)
Mutual labels:  clone
Expo Disneyplus
Disney+ UI Clone with React Native & Expo
Stars: ✭ 130 (-16.13%)
Mutual labels:  clone
Deepcopy.js
deep copy data
Stars: ✭ 112 (-27.74%)
Mutual labels:  clone

Merge

(recursive)? merging of (cloned)? objects.

Install

Node.js

npm i merge
import merge from 'merge'

Browser

<script src="https://cdn.jsdelivr.net/gh/yeikos/js.merge/dist/merge.browser.min.js"></script>
window.merge

API

merge(clone: boolean, ...items: Object[])
merge(...items: Object[])
merge.recursive(clone: boolean, ...items: Object[])
merge.recursive(...items: Object[])

Examples

// Merge 

{
	var objectA = {} 

	merge(objectA, 
		{ value: 1 }, 
		{ str: 'hello world' }
	)

	var objectB = merge(true, objectA, 
		{ value: 2 }
	)

	objectA // { value: 1, str: 'hello world' }
	objectB // { value: 2, str: 'hello world' }
}

// Recursive merge

{
	var objectA = {}

	merge.recursive(objectA, 
		{ level: { value: 1 } },
		{ level: { str: 'hello world' } }
	)
	var objectB = merge.recursive(true, objectA, 
		{ level: { value: 2 } }
	)

	objectA.level // { value: 1, str: 'hello world' }
	objectB.level // { value: 2, str: 'hello world' }
}

Test

Node.js

npm test

Browser

./dist/merge.browser.test.html
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].