2.0.1 • Published 1 year ago
custom-array-methods-useful v2.0.1
This package applies to array of strings, numbers and objects.
It performs basic array operations such as, 1.randomize array elements 2.remove duplicate elements 3.remove an element from the array 3.update an element in the array
IMPLEMENTATION
const { randomize, exclude, modify, removeDuplicates } = require('custom-array-methods-useful')
array of string/number/Object:
- Randomize
randomize(arr)
- Remove one or more elements from the array
exclude(arr, element_to_be_removed)
- Update an element (object) in the array
modify(arr, element_to_be_updated, new_element)
- Remove duplicates from the array
removeDuplicates(arr)