New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

recursive-omit-by

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

recursive-omit-by

Deletes keys from the object that match a condition without side effects.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10K
increased by1.4%
Maintainers
1
Weekly downloads
 
Created
Source

recursive-omit-by

GratiPay Downloads Version

Deletes keys from the object that match a condition without side effects.

Installation

npm instal --save-dev recursive-omit-by

Usage

import recursiveOmitBy from 'recursive-omit-by';

recursiveOmitBy(
  {
    text: 'hello',
    foo: {
      node1: true,
      node2: false,
      list: [
        { more: 'hello', foo: 1 }
      ],
      string: 'hello',
      value: 1,
    },
  },
  ({ parent, node, key, path, deep }) => key === 'value' || node === 'hello'
);
// returns new object without modifying original
// {
//   foo: {
//     node1: true,
//     node2: false,
//     list: [
//       { foo: 1 }
//     ],
//   },
// }

License

ISC

Keywords

FAQs

Package last updated on 05 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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