|
|
@ -72,8 +72,7 @@ function serialize (obj) { |
|
|
|
if (v === null) { return null; } |
|
|
|
if (v === null) { return null; } |
|
|
|
|
|
|
|
|
|
|
|
// Hackish way of checking if object is Date (this way it works between execution contexts in node-webkit).
|
|
|
|
// Hackish way of checking if object is Date (this way it works between execution contexts in node-webkit).
|
|
|
|
// We can't use value directly because for dates it is already string in this function (date.toJSON was already called),
|
|
|
|
// We can't use value directly because for dates it is already string in this function (date.toJSON was already called), so we use this
|
|
|
|
// fortunately "this" is bound here to object which is owner of the key.
|
|
|
|
|
|
|
|
if (typeof this[k].getTime === 'function') { return { $$date: this[k].getTime() }; } |
|
|
|
if (typeof this[k].getTime === 'function') { return { $$date: this[k].getTime() }; } |
|
|
|
|
|
|
|
|
|
|
|
return v; |
|
|
|
return v; |
|
|
|