Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uniq

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uniq

Removes duplicates from a sorted array in place

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.4M
decreased by-1.5%
Maintainers
1
Weekly downloads
 
Created

What is uniq?

The uniq npm package is primarily used for removing duplicate elements from an array. It provides a straightforward and efficient way to ensure that an array contains only unique values. This can be particularly useful in data processing and manipulation tasks where eliminating duplicates is necessary.

What are uniq's main functionalities?

Removing duplicates from an array

This feature allows you to pass an array to the uniq function, and it returns a new array with all the duplicate values removed. The code sample demonstrates how to use the uniq package to filter out duplicate numbers from an array, resulting in an array of unique numbers.

[...new Set([1, 2, 2, 3, 4, 4, 5])] // Returns [1, 2, 3, 4, 5]

Other packages similar to uniq

Keywords

FAQs

Package last updated on 25 May 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc