README
@nexssp/extend
15.01.2022 Upgrade - Now works also with import
as module.
const array = require('@nexssp/extend/array')
console.log(Object.keys(array)) // see all available functions for array
// or
import { remove, flat, range } from '@nexssp/extend/array'
Some functions written/re-written and/or collected to make things easier in JavaScript/NodeJS.
How to Start?
// Change to version 2.0 - now you loads as parameter on require:
const extend = require('@nexssp/extend/array')
New range function
range(0, 63) // produces [0, 1, 2, 3......62, 63 ] (note 63 includes!)
filterArray
filterArray([1, 2, 3, 4], [2, 3]) // [1, 4]
New Object dot notation (no eval!)
dset({}, 'a.b.c.d.a.b.a', { x: 1, y: 2 })
// will produce: {"a":{"b":{"c":{"d":{"a":{"b":{"a":{"x":1,"y":2}}}}}}}}
const x = {
1: 2,
[',: