All Projects → jonschlinkert → object.pick

jonschlinkert / object.pick

Licence: MIT license
(object pick) returns a filtered copy of an object with only the specified keys, exactly like `pick` from lo-dash / underscore.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to object.pick

blender-xray
STALKER (aka xray-engine) import/export plugin for Blender 3D
Stars: ✭ 132 (+238.46%)
Mutual labels:  object
Object.fromEntries
Official ES spec-compliant polyfill for Object.fromEntries
Stars: ✭ 33 (-15.38%)
Mutual labels:  object
javascript-easy-object
Now easily access or modify an object in javascript with javascript-easy-object.
Stars: ✭ 13 (-66.67%)
Mutual labels:  object
SmartReplace
Unity plug-in for replacing scene objects while keeping their references.
Stars: ✭ 50 (+28.21%)
Mutual labels:  object
python-pyfields
Define fields in python classes. Easily.
Stars: ✭ 39 (+0%)
Mutual labels:  object
Object.getOwnPropertyDescriptors
Spec-compliant shim for `Object.getOwnPropertyDescriptors` that works in ES5.
Stars: ✭ 19 (-51.28%)
Mutual labels:  object
lazy-cache
Cache requires to be lazy-loaded when needed. Uses node's own require system with tried and true, plain-vanilla JavaScript getters.
Stars: ✭ 51 (+30.77%)
Mutual labels:  object
Excel2Object
excel convert to .NET Object | Excel与.NET 对象进行转换,支持公式、多Sheet等功能
Stars: ✭ 35 (-10.26%)
Mutual labels:  object
obj-to-table
Create a table from an array of objects
Stars: ✭ 15 (-61.54%)
Mutual labels:  object
CarND-VehicleDetection
vehicle detection with deep learning
Stars: ✭ 34 (-12.82%)
Mutual labels:  object
DataTypes
Built-in data types
Stars: ✭ 34 (-12.82%)
Mutual labels:  object
is-extendable
Answers the question: "can this value have keys?". Returns true if a value is any of the object types: array, regexp, plain object, function or date. Useful for determining if a value is an object that can be extended.
Stars: ✭ 19 (-51.28%)
Mutual labels:  object
copy-anything
An optimised way to copy'ing (cloning) an Object or Array. A small and simple integration
Stars: ✭ 19 (-51.28%)
Mutual labels:  object
Fluent-Random-Picker
Fluent Random Picker is a nice, performant, fluent way to pick random values. Probabilities can be specified, values can be weighted.
Stars: ✭ 26 (-33.33%)
Mutual labels:  pick
harmony-ecs
A small archetypal ECS focused on compatibility and performance
Stars: ✭ 33 (-15.38%)
Mutual labels:  object
object.omit
Return a copy of an object without the given keys.
Stars: ✭ 79 (+102.56%)
Mutual labels:  object
qverse
Traverse any data with DPML commands.
Stars: ✭ 25 (-35.9%)
Mutual labels:  object
is-string
Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Stars: ✭ 17 (-56.41%)
Mutual labels:  object
filter-anything
A simple (TypeScript) integration of "pick" and "omit" to filter props of an object
Stars: ✭ 19 (-51.28%)
Mutual labels:  pick
mvbasic
MultiValue Basic extension for Visual Studio Code
Stars: ✭ 19 (-51.28%)
Mutual labels:  pick

object.pick NPM version NPM monthly downloads NPM total downloads Linux Build Status

Returns a filtered copy of an object with only the specified keys, similar to _.pick from lodash / underscore.

You might also be interested in object.omit.

Install

Install with npm:

$ npm install --save object.pick

benchmarks

This is the fastest implementation I tested. Pull requests welcome!

Usage

var pick = require('object.pick');

pick({a: 'a', b: 'b'}, 'a')
//=> {a: 'a'}

pick({a: 'a', b: 'b', c: 'c'}, ['a', 'b'])
//=> {a: 'a', b: 'b'}

About

Related projects

  • extend-shallow: Extend an object with the properties of additional objects. node.js/javascript util. | homepage
  • get-value: Use property paths (a.b.c) to get a nested value from an object. | homepage
  • mixin-deep: Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | homepage
  • set-value: Create nested values and any intermediaries using dot notation ('a.b.c') paths. | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)

To generate the readme and API documentation with verb:

$ npm install -g verb verb-generate-readme && verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.


This file was generated by verb-generate-readme, v0.2.0, on October 27, 2016.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].