NASA Keypath Module
New Age Keypath Traversal Technology. Traverse and manipulate Objects with ease using the newfangled string dot notation all the kids are raving about!
Installation
npm install nasa-keypath
or include index.js
in your browser.
Utilization
References
var keypath = ;var on = users: _id: '290682069820139' password: 'something-unique' _id: '908164718613492' password: 'something-unique' admin: true count: total: 2 admins: 1 ;
This code has no real meaning, only to show the power of what keypath can do.
Functional
// Array Manipulationkeypath; // No more passwords, safe to show.keypath; // All users are now activated.keypath; // Is this user authorized?keypath; // Get all users who are admin, and full object. // Manipulationkeypath;keypath; // We can iterate for admins.
OOP
var path = ; // Array Manipulationpath; // No more passwords, safe to show.path; // All users are now activated.path; // Is this user an admin?path; // Get all users who are admin, and full object. // Manipulationpath; // 1path; // We can iterate for admins.