(source, property, callback)
| 1821 | // `callback` function for each value. This is an implementation of the |
| 1822 | // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2. |
| 1823 | var walk = function (source, property, callback) { |
| 1824 | var value = source[property], length; |
| 1825 | if (typeof value == "object" && value) { |
| 1826 | // `forEach` can't be used to traverse an array in Opera <= 8.54 |
| 1827 | // because its `Object#hasOwnProperty` implementation returns `false` |
| 1828 | // for array indices (e.g., `![1, 2, 3].hasOwnProperty("0")`). |
| 1829 | if (getClass.call(value) == arrayClass) { |
| 1830 | for (length = value.length; length--;) { |
| 1831 | update(value, length, callback); |
| 1832 | } |
| 1833 | } else { |
| 1834 | forEach(value, function (property) { |
| 1835 | update(value, property, callback); |
| 1836 | }); |
| 1837 | } |
| 1838 | } |
| 1839 | return callback.call(source, property, value); |
| 1840 | }; |
| 1841 | |
| 1842 | // Public: `JSON.parse`. See ES 5.1 section 15.12.2. |
| 1843 | exports.parse = function (source, callback) { |
no test coverage detected