parse-path

parse javascript object path

npm install parse-path
4 downloads in the last week
8 downloads in the last month

parse-path

parse javascript object path

parsePath(document, 'location.href')
// => github.com

window.foo = { bar : function (){ return { msg: ['hello world'] }; } };

parsePath(window, 'foo.bar.msg.0')
// => hello world

Install

$ npm install parse-path

npm loves you