Comparing version 2.1.0 to 3.0.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2911
34
Yes
16