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

filter-anything

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

filter-anything - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

package.json
{
"name": "filter-anything",
"version": "2.1.0",
"version": "2.1.1",
"sideEffects": false,

@@ -5,0 +5,0 @@ "description": "A simple (TypeScript) integration of \"pick\" and \"omit\" to filter props of an object",

@@ -37,20 +37,20 @@ # Filter anything ⚔️

```js
import { fillable } from 'filter-anything'
import { pick } from 'filter-anything'
const squirtle = { id: '007', name: 'Squirtle', type: 'water' }
const withoutId = fillable(squirtle, ['name', 'type'])
const withoutId = pick(squirtle, ['name', 'type'])
// returns { name: 'Squirtle', type: 'water' }
```
### Guard
### Omit
With `guard` you pass an object and an array of keys of an object - the props which should be removed.
With `omit` you pass an object and an array of keys of an object - the props which should be removed.
```js
import { guard } from 'filter-anything'
import { omit } from 'filter-anything'
const squirtle = { id: '007', name: 'Squirtle', type: 'water' }
const withoutId = guard(squirtle, ['name', 'type'])
const withoutId = omit(squirtle, ['name', 'type'])
// returns { name: 'Squirtle', type: 'water' }

@@ -57,0 +57,0 @@ ```

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