(source, property, callback)
| 861 | // `callback` function for each value. This is an implementation of the |
| 862 | // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2. |
| 863 | var walk = function (source, property, callback) { |
| 864 | var value = source[property], length; |
| 865 | if (typeof value == "object" && value) { |
| 866 | // `forOwn` can't be used to traverse an array in Opera <= 8.54 |
| 867 | // because its `Object#hasOwnProperty` implementation returns `false` |
| 868 | // for array indices (e.g., `![1, 2, 3].hasOwnProperty("0")`). |
| 869 | if (getClass.call(value) == arrayClass) { |
| 870 | for (length = value.length; length--;) { |
| 871 | update(getClass, forOwn, value, length, callback); |
| 872 | } |
| 873 | } else { |
| 874 | forOwn(value, function (property) { |
| 875 | update(value, property, callback); |
| 876 | }); |
| 877 | } |
| 878 | } |
| 879 | return callback.call(source, property, value); |
| 880 | }; |
| 881 | |
| 882 | // Public: `JSON.parse`. See ES 5.1 section 15.12.2. |
| 883 | exports.parse = function (source, callback) { |
no test coverage detected