Soup.merge() - shysolocup/stews GitHub Wiki
merges the soup with other objects
type: Function
alt names:
- concat()
arguments:
- ?mergers
Any
list of objects (array or arguments) to merge with
list: | pair: |
const { Soup } = require('stews');
let arr1 = new Soup([ "a", "b" ]);
let arr2 = new Soup([ "c", "d" ]);
let arr3 = new Soup([ "e", "f" ]);
console.log(arr1.merge(arr2, arr3)); |
const { Soup } = require('stews');
let obj1 = new Soup({ a: 0, b: 1 });
let obj2 = new Soup({ c: 2, d: 3 });
let obj3 = new Soup({ e: 4, f: 5 });
console.log(obj1.merge(obj2, obj3)); |
Soup(6) [ "a", "b", "c", "d", "e", "f" ] |
Soup(6) { a: 0, b: 1, c: 2, d: 3, e: 4, f: 5 } |