Stew.merge() - shysolocup/stews GitHub Wiki

merges the stew with other objects
type: Function

alt names:

  • concat()

arguments:

  • ?mergers Any
    list of objects (array or arguments) to merge with

list: pair:
const { Stew } = require('stews');


let arr1 = new Stew([ "a", "b" ]);
let arr2 = new Stew([ "c", "d" ]);
let arr3 = new Stew([ "e", "f" ]);


console.log(arr1.merge(arr2, arr3));
const { Stew } = require('stews');


let obj1 = new Stew({ a: 0, b: 1 });
let obj2 = new Stew({ c: 2, d: 3 });
let obj3 = new Stew({ e: 4, f: 5 });


console.log(obj1.merge(obj2, obj3));
Stew(6) [ "a", "b", "c", "d", "e", "f" ]
Stew(6) { a: 0, b: 1, c: 2, d: 3, e: 4, f: 5 }


⚠️ **GitHub.com Fallback** ⚠️