arrays-magic
v1.1.4
Published
This repository is for testing how to create npm package.
Downloads
5
Readme
Arrays magic
This repository is for testing how to create npm package.
Usage
Configuration options can also be set in package.json's config.readme.
# import
import removeArrayDuplicates from 'arrays-magic'
# use
# Return a array without duplicates
const randomNumberArray = [1, 2, 3, 1, 4, 1, 2, 5, 3, 4];
const uniqueNums = removeArrayDuplicates(randomNumberArray);
# Return a boolean, remove undefined and null values and leave false and 0 as a falsy values
const randomNumberArray = [1, 2, 3, undefined, null];
const isArrayWithoutValues = isArrayEmpty(randomNumberArray);
Installation
npm install arrays-magic