fast-get
Gets the value at
path
ofobject
(with an optionaldefault
)
Install
npm install fast-get
This module can be used for Node.js as well as browsers using Browserify.
Usage
const _get = const object = a: b: c: 3 // => 3 // => 3 // => 'default'
Tests
npm test
Benchmark
npm run benchmark
Size (uglify + gzip) | Performance (array) | Performance (string) | |
---|---|---|---|
fast-get | 220 bytes | 612,000 ops/sec | 571,000 ops/sec |
lodash.get | 2,145 bytes | 810,000 ops/sec | 200,000 ops/sec |
Licence
MIT