deep-value

1.0.4 • Public • Published

deep-value

npm version dependencies Build Status Pledge To Arupex! lifetimeDownloadCount

Install

npm install deep-value --save

Bower

bower install deep-value --save

How to Use (node):

var deep = require('deep-value');

console.log('Checking, ' deep({ my : { value : 7} }, 'my.value'));  // 7

console.log('Checking, ' deep({ my : {} }, 'my.value'));            // undefined

console.log('Checking, ' deep({ notMine : {} }, 'my.value'));       // undefined

How to use (Browser):

var deep = arupex_deep_value;

Array Accessor

Finds the element in an array that follows the correct values and returns the value from it you want, if you dont want a value from it but want the whole object dont include a last key

console.log('Checking, ' deep({ notMine : [{ i : 1 , b : 2},{ i : 2, b : 2},{ i : 2, b : 1, v : 2}] }, 'notMine.@i==2,@b==1.v'));       // 2

console.log('Checking, ' deep({ notMine : [{ i : 1 , b : 2},{ i : 2, b : 2},{ i : 2, b : 1, v : 2}] }, 'notMine.@i==2,@b==1'));       // { i : 2, b : 1, v : 2}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    139
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    139
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    1

Package Sidebar

Install

npm i deep-value

Weekly Downloads

140

Version

1.0.4

License

UNLICENSED

Last publish

Collaborators

  • dirwin517