StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/engine/node_modules/get-value/README.md

99 lines
3.2 KiB

# get-value [![NPM version](https://badge.fury.io/js/get-value.svg)](http://badge.fury.io/js/get-value) [![Build Status](https://travis-ci.org/jonschlinkert/get-value.svg)](https://travis-ci.org/jonschlinkert/get-value)
> Use property paths (`a.b.c`) to get a nested value from an object.
**[Benchmarks](./benchmark)**
This is 10x faster and more performant than [dot-prop](https://github.com/sindresorhus/dot-prop), and it passes all of the dot-prop tests.
Of the libs benchmarked, _dot-prop was the least performant_:
```bash
#1: deep
get-value x 3,308,335 ops/sec ±1.32% (94 runs sampled)
dot-prop x 197,631 ops/sec ±1.27% (94 runs sampled)
getobject x 218,635 ops/sec ±1.51% (91 runs sampled)
#2: shallow
get-value x 5,762,976 ops/sec ±1.21% (95 runs sampled)
dot-prop x 695,892 ops/sec ±1.42% (95 runs sampled)
getobject x 724,493 ops/sec ±1.46% (93 runs sampled)
```
Also, get-value supports escaping dots in paths, which is common when object keys are file paths with extensions, dot-prop does not.
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i get-value --save
```
Install with [bower](http://bower.io/)
```sh
$ bower install get-value --save
```
## Usage
```js
var get = require('get-value');
var obj = {a: {b : {c: {d: 'foo'}}}, e: [{f: 'g'}]};
get(obj, 'a.b.c');
//=> {d: 'foo'}
get(obj, 'a.b.c.d');
//=> 'foo'
get(obj, 'e[0].f');
//=> 'g'
```
**key as an array**
Optionally pass the key as an array (this is useful when you need to dynamically build up the property name)
```js
var obj = {a: {b: 'c'}};
get(obj, ['a', 'b']);
//=> 'c'
```
## Related projects
* [has-any](https://www.npmjs.com/package/has-any): Returns true if an object has any of the specified keys. | [homepage](https://github.com/jonschlinkert/has-any)
* [has-any-deep](https://www.npmjs.com/package/has-any-deep): Return true if `key` exists deeply on the given object. | [homepage](https://github.com/jonschlinkert/has-any-deep)
* [has-value](https://www.npmjs.com/package/has-value): Returns true if a value exists, false if empty. Works with deeply nested values using… [more](https://www.npmjs.com/package/has-value) | [homepage](https://github.com/jonschlinkert/has-value)
* [set-value](https://www.npmjs.com/package/set-value): Create nested values and any intermediaries using dot notation (`'a.b.c'`) paths. | [homepage](https://github.com/jonschlinkert/set-value)
* [unset-value](https://www.npmjs.com/package/unset-value): Delete nested properties from an object using dot notation. | [homepage](https://github.com/jonschlinkert/unset-value)
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/get-value/issues/new).
## Running tests
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright © 2014-2015 [Jon Schlinkert](https://github.com/jonschlinkert)
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 28, 2015._