mirror of
https://github.com/ascribe/onion.git
synced 2025-01-05 11:25:09 +01:00
Correct misleading comments in utils
This commit is contained in:
parent
0c51eb374e
commit
de3c5bca14
@ -131,7 +131,8 @@ export function mergeOptions(...l) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merges a number of objects even if there're having duplicates.
|
* Merges a number of objects even if there're having duplicates,
|
||||||
|
* taking the last given value for the key.
|
||||||
*
|
*
|
||||||
* DOES NOT RETURN AN ERROR!
|
* DOES NOT RETURN AN ERROR!
|
||||||
*
|
*
|
||||||
@ -141,8 +142,6 @@ export function mergeOptions(...l) {
|
|||||||
* @return {[type]} [description]
|
* @return {[type]} [description]
|
||||||
*/
|
*/
|
||||||
export function mergeOptionsWithDuplicates(...l) {
|
export function mergeOptionsWithDuplicates(...l) {
|
||||||
// If the objects submitted in the list have duplicates,in their key names,
|
|
||||||
// abort the merge and tell the function's user to check his objects.
|
|
||||||
let newObj = {};
|
let newObj = {};
|
||||||
|
|
||||||
for(let i = 1; i < l.length; i++) {
|
for(let i = 1; i < l.length; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user