shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
unique
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.array
This function simply take an array as parameter and return a new one with all the duplicates values removed.
Params
- array*-Array
The array to deduplicates
Return
- -Array
The deduplicated array
Example
import { unique } from '@blackbyte/sugar/array';
unique(['hello','world','hello','world']); // => ['hello','world']Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space
Changelog
- 1.0.0-beta.2Add the “stringify” option to compare objects in string format