diff --git a/bower.json b/bower.json index 86c4f05..460dfba 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "canonical-object-notation", - "version": "0.4.0", + "version": "0.4.1", "description": "CANON", "main": "lib/canon.js", "ignore": [ diff --git a/lib/canon.js b/lib/canon.js index 62f8054..6806cbb 100644 --- a/lib/canon.js +++ b/lib/canon.js @@ -1,4 +1,4 @@ -// Generated by CoffeeScript 1.7.1 +// Generated by CoffeeScript 1.8.0 (function() { var CANON, hasOwnProperty, isArguments, keys, map, nativeMap, pad, toString, _ref, __slice = [].slice, @@ -17,7 +17,7 @@ CANON.stringify = (function() { var canonicalize; canonicalize = function(value) { - var pair, _ref; + var key, list, _i, _len, _ref; if (value === null) { return null; } else if (value === void 0) { @@ -41,10 +41,13 @@ } break; case '[object Object]': - pair = function(key) { - return [key, canonicalize(value[key])]; - }; - return (_ref = ['Object']).concat.apply(_ref, map(keys(value).sort(), pair)); + list = ['Object']; + _ref = keys(value).sort(); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + key = _ref[_i]; + list.push(key, canonicalize(value[key])); + } + return list; case '[object RegExp]': return ['RegExp', "" + value]; default: diff --git a/package.json b/package.json index 42f44c7..3003334 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "canon", - "version": "0.4.0", + "version": "0.4.1", "description": "Canonical object notation", "author": "David Chambers ", "keywords": [