Node js library containing utils or helper functions to solve any need to sort array remove duplicates
You can use yarn
or npm
.
yarn add node-utils-package
npm install --save node-utils-package
- Simply import node-utils-package
import {flattenElements} from 'node-utils-package';
const array = [[[0]], [1], [[[1]]]]
flattenElements(array)
- Calculate the factorial of a number
const {numberFactorial, flattenElements} = require("node-utils-package")
const array = [[[0]], [1], [[[1]]]]
console.log(flattenElements(array))
console.log(numberFactorial(5));
- Create a validation so that if a string is sent, it will return null