-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sean Hamilton
committed
Nov 29, 2018
1 parent
3a623cf
commit a98e5ce
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// npm | ||
import circleAssign from 'circle-assign'; | ||
|
||
|
||
/** | ||
* Merge all sources into the target with the most right source | ||
* having the most priority | ||
* | ||
* Uses circle-assign | ||
* @see https://www.npmjs.com/package/circle-assign | ||
* | ||
* @param {object} target The target object | ||
* @param {...object} sources The sources | ||
* | ||
* @returns {object} The merged object | ||
*/ | ||
function merge(target, ...sources) { | ||
return circleAssign.apply(null, [target, ...sources]); | ||
} | ||
|
||
export default merge; |