PATH:
usr
/
local
/
lib
/
node_modules
/
gulp
/
node_modules
/
es5-ext
/
object
"use strict"; var toArray = require("./to-array") , isDate = require("../date/is-date") , isValue = require("../object/is-value") , isRegExp = require("../reg-exp/is-reg-exp"); var isArray = Array.isArray , stringify = JSON.stringify , objHasOwnProperty = Object.prototype.hasOwnProperty; var keyValueToString = function (value, key) { return stringify(key) + ":" + module.exports(value); }; var sparseMap = function (arr) { var i, length = arr.length, result = new Array(length); for (i = 0; i < length; ++i) { if (!objHasOwnProperty.call(arr, i)) continue; result[i] = module.exports(arr[i]); } return result; }; module.exports = function (obj) { if (!isValue(obj)) return String(obj); switch (typeof obj) { case "string": return stringify(obj); case "number": case "boolean": case "function": return String(obj); case "object": if (isArray(obj)) return "[" + sparseMap(obj) + "]"; if (isRegExp(obj)) return String(obj); if (isDate(obj)) return "new Date(" + obj.valueOf() + ")"; return "{" + toArray(obj, keyValueToString) + "}"; default: throw new TypeError("Serialization of " + String(obj) + "is unsupported"); } };
[-] is-callable.js
[edit]
[-] compact.js
[edit]
[-] copy-deep.js
[edit]
[-] first-key.js
[edit]
[-] ensure-finite-number.js
[edit]
[-] find.js
[edit]
[-] validate-stringifiable-value.js
[edit]
[-] validate-array-like.js
[edit]
[-] validate-array-like-object.js
[edit]
[-] ensure-natural-number.js
[edit]
[-] ensure-promise.js
[edit]
[-] mixin-prototypes.js
[edit]
[-] map-keys.js
[edit]
[-] is-array-like.js
[edit]
[-] is-value.js
[edit]
[-] is-integer.js
[edit]
[-] copy.js
[edit]
[-] is-empty.js
[edit]
[-] is.js
[edit]
[+]
..
[+]
keys
[-] some.js
[edit]
[-] key-of.js
[edit]
[-] find-key.js
[edit]
[+]
assign
[-] is-promise.js
[edit]
[-] is-copy-deep.js
[edit]
[-] validate-stringifiable.js
[edit]
[-] flatten.js
[edit]
[-] is-object.js
[edit]
[-] unserialize.js
[edit]
[-] ensure-thenable.js
[edit]
[-] valid-value.js
[edit]
[-] eq.js
[edit]
[-] valid-object.js
[edit]
[+]
entries
[-] is-plain-function.js
[edit]
[-] get-property-names.js
[edit]
[-] ensure-plain-object.js
[edit]
[-] assign-deep.js
[edit]
[-] ensure-natural-number-value.js
[edit]
[-] is-plain-object.js
[edit]
[-] is-thenable.js
[edit]
[-] count.js
[edit]
[-] index.js
[edit]
[-] to-array.js
[edit]
[-] _iterate.js
[edit]
[-] primitive-set.js
[edit]
[-] compare.js
[edit]
[-] is-finite-number.js
[edit]
[-] map.js
[edit]
[-] filter.js
[edit]
[-] every.js
[edit]
[-] ensure-plain-function.js
[edit]
[-] safe-traverse.js
[edit]
[-] create.js
[edit]
[-] is-copy.js
[edit]
[-] is-natural-number-value.js
[edit]
[-] clear.js
[edit]
[-] ensure-array.js
[edit]
[-] is-natural-number.js
[edit]
[-] valid-callable.js
[edit]
[-] for-each.js
[edit]
[+]
set-prototype-of
[-] normalize-options.js
[edit]
[-] serialize.js
[edit]
[-] is-number-value.js
[edit]
[-] mixin.js
[edit]
[-] ensure-integer.js
[edit]