fuzzy-path
String -> { k: v } -> v | undefined
Drill down an object in a fuzzy fashion.
Example
; const info = firstName: 'Trevor' lastName: 'Senior' address: city: 'Seattle' state: 'VA' zip: 12345 address1: '55 W St.' address2: '#4' phoneNumbers: home: 9993334444 mobile: 1112223333 ; ; // 'Trevor'; // 'Trevor'; // 'Seattle'; // 111222333 ; // undefined; // undefined // throws error! too many options to choose from; // throws error! invalid path (firstName is a string);
Currying
var getMobileNumber = ; ; // 111222333
Install
npm install --save fuzzy-path