Package Exports
- path-toolkit
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (path-toolkit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
PathToolkit
A configurable, high-speed, feature-rich object path resolver.
Installation
Git
git clone https://github.com/frenchroasted/path-toolkit.git path-toolkit
NPM
npm install path-toolkit
Bower
bower install path-toolkit
Documentation
Usage
var PathToolkit = require('path-toolkit');
var ptk = new PathToolkit();
var obj = {
foo: {
bar: [ 'a', 'b', 'c']
}
};
ptk.get(obj, 'foo.bar.1'); // 'b'
ptk.set(obj, 'foo.bar.0', 'x'); // true
ptk.get(obj, 'foo.bar.sort().reverse().0'); // 'x'
PathToolkit includes many more features, all documented with example code in the API. The path syntax is completely configurable, the interpreter is fast in general, and is very, very fast when processing simple property-sequence paths.