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

lodash.pickby

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.pickby

The lodash method `_.pickBy` exported as a module.

  • 4.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
888K
decreased by-30.93%
Maintainers
3
Weekly downloads
 
Created

What is lodash.pickby?

The lodash.pickby npm package is a method from the Lodash library that creates an object composed of the object properties predicate returns truthy for. The predicate is invoked with two arguments: (value, key).

What are lodash.pickby's main functionalities?

Filtering object properties based on values

This code uses lodash.pickby to create a new object from the given object by keeping only the properties where the values are numbers.

{"result": _.pickBy({ 'a': 1, 'b': '2', 'c': 3 }, _.isNumber)}

Filtering object properties based on custom predicate

This code demonstrates how to use a custom predicate function to filter object properties, keeping only those where the value is greater than 1.

{"result": _.pickBy({ 'a': 1, 'b': '2', 'c': 3 }, function(value) { return value > 1; })}

Other packages similar to lodash.pickby

Keywords

FAQs

Package last updated on 13 Aug 2016

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