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

@ndhoule/pick

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndhoule/pick

Create a shallow copy of an input object that contains only the specified properties.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

pick CI

Create a shallow copy of an input object that contains only the specified properties.

$ component install ndhoule/pick
$ npm install @ndhoule/pick

API

pick(props : string|string[], object: Object) => Object

Return a shallow copy of an input object containing only a specified list of properties.

var person = { name: 'Tim', occupation: 'enchanter', fears: 'rabbits' };

pick('name', person);
//=> { name: 'Tim' }

pick(['name', 'fears'], person);
//=> { name: 'Tim', fears: 'rabbits' }

License

Released under the MIT license.

Keywords

FAQs

Package last updated on 02 May 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