| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Parse js object paths using both dot and bracket notation. Stringify an array of properties into a valid path.
ObjectPath.parse(str)
var ObjectPath = require('objectpath');
ObjectPath.parse('a[1].b.c.d["e"]["f"].g');
// => ['a','1','b','c','d','e','f','g']ObjectPath.stringify(arr, [quote=''']);
var ObjectPath = require('objectpath');
ObjectPath.stringify(['a','1','b','c','d','e','f','g']);
// => '[\'a\'][\'1\'][\'b\'][\'c\'][\'d\'][\'e\'][\'f\'][\'g\']'
ObjectPath.stringify(['a','1','b','c','d','e','f','g'],'"');
// => '["a"]["1"]["b"]["c"]["d"]["e"]["f"]["g"]'ObjectPath.normalize(str)
var ObjectPath = require('objectpath');
ObjectPath.parse('a[1].b.c.d["e"]["f"].g');
// => '["a"]["1"]["b"]["c"]["d"]["e"]["f"]["g"]'| Back | FazBrowse Home | New Git URL |