
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
npm-array-unique
Advanced tools
Receives array as an input and returns the unique array and also an object whith array items and their occurences
Receives array as an input and returns the unique array and also an object whith array items and their occurences
npm i npm-array-unique
var arrayUnique = require('npm-array-unique');
Receives the input array and returns the unique array
var arrayUnique = require('npm-array-unique')
var inputArray = [1,2,3,4,3,2,4,3,4,5,4,5,5];
arrayUnique.unique(inputArray);
// [ 1, 2, 3, 4, 5]
var inputArray2 = ['one', 5, 'two', 'three', 5, 'one', 'three', 7];
arrayUnique.unique(inputArray2);
// ['one', 5, 'two','three', 7];
Receives the input array and returns the unique array
var arrayUnique = require('npm-array-unique')
var inputArray = [1,2,3,4,4,4,4,5,6,7,7,8,8,8];
arrayUnique.uniqueCount(inputArray);
// { '1': 1, '2': 1, '3': 1, '4': 4, '5': 1, '6': 1, '7': 2, '8': 3 }
Receives the input array and returns the unique array
var arrayUnique = require('npm-array-unique')
var inputArray = [1,2,3,4,2,3,4,2,3,4,5,6,7,8,9,0,6,7,8,9];
arrayUnique.itemCount(inputArray, 7);
// 2
Demo @npm-array-unique | https://tonicdev.com/npm/npm-array-unique
Krishcdbry [krishcdbry@gmail.com]
MIT @krishcdbry
FAQs
Receives array as an input and returns the unique array and also an object whith array items and their occurences
The npm package npm-array-unique receives a total of 0 weekly downloads. As such, npm-array-unique popularity was classified as not popular.
We found that npm-array-unique demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.