(root, obj)
| 97 | } |
| 98 | exports.unescapePathComponent = unescapePathComponent; |
| 99 | function _getPathRecursive(root, obj) { |
| 100 | var found; |
| 101 | for (var key in root) { |
| 102 | if (hasOwnProperty(root, key)) { |
| 103 | if (root[key] === obj) { |
| 104 | return escapePathComponent(key) + '/'; |
| 105 | } |
| 106 | else if (typeof root[key] === 'object') { |
| 107 | found = _getPathRecursive(root[key], obj); |
| 108 | if (found != '') { |
| 109 | return escapePathComponent(key) + '/' + found; |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | } |
| 114 | return ''; |
| 115 | } |
| 116 | exports._getPathRecursive = _getPathRecursive; |
| 117 | function getPath(root, obj) { |
| 118 | if (root === obj) { |
no test coverage detected