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

@common-utilities/filter-array

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@common-utilities/filter-array - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

3

dist/index.js

@@ -13,4 +13,5 @@ "use strict";

*/
exports.filterArray = (arr) => arr.filter((item, index, self) => self.indexOf(item) === index);
const filterArray = (arr) => arr.filter((item, index, self) => self.indexOf(item) === index);
exports.filterArray = filterArray;
exports.default = exports.filterArray;
//# sourceMappingURL=index.js.map
{
"name": "@common-utilities/filter-array",
"version": "0.0.3",
"version": "0.0.4",
"description": "A basic implementation of the common utility function, filter-array 🧹",

@@ -33,3 +33,3 @@ "main": "dist/index.js",

},
"gitHead": "3de4a71ca5c0192f988bfdede188fc72f941f9a4"
"gitHead": "896fa6971331656a6762f2215104bf5d01fbe21c"
}

@@ -18,14 +18,9 @@ # @common-utilities/filter-array 🧰🧹

```typescript
```javascript
const filterArray = (arr) => arr.filter((item, index, self) => self.indexOf(item) === index)
```
```typescript
const filterArray = (arr: unknown[]): unknown[] =>
arr.filter((item: unknown, index: number, self: unknown[]) => self.indexOf(item) === index)
```
## Usage
```typescript
```javascript
filterArray(['test', 'test', 'foo', 'bar', 'biz'])

@@ -32,0 +27,0 @@ // ['test', 'foo', 'bar', 'biz'])

Sorry, the diff of this file is not supported yet

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