array-filter-unique
Advanced tools
Comparing version 3.0.2 to 3.1.0
{ | ||
"name": "array-filter-unique", | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"description": "JavaScript array.filter() compatible unique filter", | ||
@@ -13,47 +13,31 @@ "keywords": [ | ||
"license": "MIT", | ||
"repository": "EdJoPaTo/array-filter-unique", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/EdJoPaTo/array-filter-unique.git" | ||
}, | ||
"author": { | ||
"name": "EdJoPaTo", | ||
"email": "array-filter-unique-npm-package@edjopato.de", | ||
"email": "array-filter-unique-typescript-package@edjopato.de", | ||
"url": "https://edjopato.de" | ||
}, | ||
"scripts": { | ||
"build": "del-cli dist && tsc", | ||
"prepack": "npm run build", | ||
"test": "tsc --sourceMap && xo && ava" | ||
"prepare": "deno2node", | ||
"pretest": "deno2node", | ||
"test": "node --test" | ||
}, | ||
"type": "module", | ||
"engines": { | ||
"node": ">=14" | ||
"node": ">=12" | ||
}, | ||
"devDependencies": { | ||
"@sindresorhus/tsconfig": "^3.0.0", | ||
"ava": "^4.0.0", | ||
"del-cli": "^4.0.0", | ||
"typescript": "^4.2.3", | ||
"xo": "^0.49.0" | ||
"@types/node": "^18.19.3", | ||
"deno2node": "1.11.0" | ||
}, | ||
"files": [ | ||
"dist/source", | ||
"!*.test.*" | ||
"dist", | ||
"!*.test.*", | ||
"!test.*" | ||
], | ||
"main": "./dist/source/index.js", | ||
"types": "./dist/source/index.d.ts", | ||
"xo": { | ||
"rules": { | ||
"@typescript-eslint/prefer-readonly-parameter-types": "error", | ||
"ava/no-ignored-test-files": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"**/*.test.*", | ||
"test/**/*.*" | ||
], | ||
"rules": { | ||
"@typescript-eslint/prefer-readonly-parameter-types": "off" | ||
} | ||
} | ||
] | ||
} | ||
"main": "./dist/mod.js", | ||
"types": "./dist/mod.d.ts" | ||
} |
@@ -5,9 +5,13 @@ # array-filter-unique | ||
[![node](https://img.shields.io/node/v/array-filter-unique.svg)](https://www.npmjs.com/package/array-filter-unique) | ||
[![deno module](https://shield.deno.dev/x/array_filter_unique)](https://deno.land/x/array_filter_unique) | ||
> JavaScript array.filter() compatible unique filter | ||
As all unique libraries are used as a function and not within the easily stackable and immutable arr.format() style I made my own. | ||
As all unique libraries are used as a function and not within the easily | ||
stackable and immutable arr.format() style I made my own. | ||
## Install | ||
Node.js: | ||
```bash | ||
@@ -17,6 +21,12 @@ npm install array-filter-unique | ||
Deno: | ||
```ts | ||
import {/* ... */} from "https://deno.land/x/array_filter_unique/mod.ts"; | ||
``` | ||
## Usage | ||
```js | ||
import {arrayFilterUnique} from 'array-filter-unique'; | ||
import { arrayFilterUnique } from "array-filter-unique"; | ||
@@ -32,12 +42,2 @@ ['a', 'a', 'b', 'c'] | ||
## API | ||
### arrayFilterUnique([selector]) | ||
#### selector | ||
Type: `item => string` | ||
Select what to check in the given item | ||
## Migrate from v2 to v3 | ||
@@ -44,0 +44,0 @@ |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
4280
2
28
0