Socket
Socket
Sign inDemoInstall

array-uniq

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 3.0.0

8

index.d.ts

@@ -8,3 +8,3 @@ /**

```
import arrayUniq = require('array-uniq');
import arrayUniq from 'array-uniq';

@@ -18,6 +18,2 @@ arrayUniq([1, 1, 2, 3, 3]);

*/
declare function arrayUniq<ValueType>(
array: ReadonlyArray<ValueType>
): ValueType[];
export = arrayUniq;
export default function arrayUniq<ValueType>(array: readonly ValueType[]): ValueType[];

@@ -1,5 +0,3 @@

'use strict';
const arrayUniq = array => [...new Set(array)];
module.exports = arrayUniq;
export default function arrayUniq(array) {
return [...new Set(array)];
}
{
"name": "array-uniq",
"version": "2.1.0",
"version": "3.0.0",
"description": "Create an array without duplicates",
"license": "MIT",
"repository": "sindresorhus/array-uniq",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=6"
"node": ">=12"
},

@@ -31,6 +34,6 @@ "scripts": {

"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
"ava": "^3.15.0",
"tsd": "^0.14.0",
"xo": "^0.39.1"
}
}

@@ -1,6 +0,5 @@

# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq)
# array-uniq
> Create an array without duplicates
## Install

@@ -12,7 +11,6 @@

## Usage
```js
const arrayUniq = require('array-uniq');
import arrayUniq from 'array-uniq';

@@ -26,5 +24,12 @@ arrayUniq([1, 1, 2, 3, 3]);

---
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-array-uniq?utm_source=npm-array-uniq&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc