--- tags: zeta-dom --- # Collection utilities ### `makeArray` Creates an array containing the specified item if the given object is not an array. ```typescript makeArray(array) makeArray(arrayLike) makeArray(map) makeArray(set) makeArray(value) ``` ###### Returns * A copy of array if the object is an array; * or an array containing items in an array-like object or iterable collection like `Map` or `Set`; * or an array with exactly one item (the input object) if it does not equals to `null` or `undefined`; * otherwise an empty array. ### `extend` ### `each` ### `map` ### `mapObject` ### `grep` ### `splice` ### `any` ### `single` ### `kv` ### `pick` ```typescript pick(obj, keys) pick(obj, callback) ``` ### `exclude` ```typescript exclude(obj, keys) exclude(obj, callback) ``` ### `mapGet` ### `mapRemove` ### `setAdd` ```typescript setAdd(set, obj): boolean ``` ### `equal` ```typescript equal(arr1, arr2): boolean equal(map1, map2): boolean equal(set1, set2): boolean ```