mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-01 07:48:20 -04:00
Updates json2.js to 2013-05-26.
This commit is contained in:
parent
17dc62411f
commit
28ca49dc72
2 changed files with 5 additions and 5 deletions
|
@ -77,6 +77,7 @@ It profits from these great projects:
|
||||||
* updates jQuery.mousewheel to 3.1.3
|
* updates jQuery.mousewheel to 3.1.3
|
||||||
* updates Moment.js to 2.1.0
|
* updates Moment.js to 2.1.0
|
||||||
* updates markdown-js to 0.4.0-9c21acdf08
|
* updates markdown-js to 0.4.0-9c21acdf08
|
||||||
|
* updates json2.js to 2013-05-26
|
||||||
* adds `uk` translation by Viktor Matveenko
|
* adds `uk` translation by Viktor Matveenko
|
||||||
* updates to `pl` translation by Mark
|
* updates to `pl` translation by Mark
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
json2.js
|
json2.js
|
||||||
2011-10-19
|
2013-05-26
|
||||||
|
|
||||||
Public Domain.
|
Public Domain.
|
||||||
|
|
||||||
|
@ -159,8 +159,7 @@
|
||||||
// Create a JSON object only if one does not already exist. We create the
|
// Create a JSON object only if one does not already exist. We create the
|
||||||
// methods in a closure to avoid creating global variables.
|
// methods in a closure to avoid creating global variables.
|
||||||
|
|
||||||
var JSON;
|
if (typeof JSON !== 'object') {
|
||||||
if (!JSON) {
|
|
||||||
JSON = {};
|
JSON = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +173,7 @@ if (!JSON) {
|
||||||
|
|
||||||
if (typeof Date.prototype.toJSON !== 'function') {
|
if (typeof Date.prototype.toJSON !== 'function') {
|
||||||
|
|
||||||
Date.prototype.toJSON = function (key) {
|
Date.prototype.toJSON = function () {
|
||||||
|
|
||||||
return isFinite(this.valueOf())
|
return isFinite(this.valueOf())
|
||||||
? this.getUTCFullYear() + '-' +
|
? this.getUTCFullYear() + '-' +
|
||||||
|
@ -188,7 +187,7 @@ if (!JSON) {
|
||||||
|
|
||||||
String.prototype.toJSON =
|
String.prototype.toJSON =
|
||||||
Number.prototype.toJSON =
|
Number.prototype.toJSON =
|
||||||
Boolean.prototype.toJSON = function (key) {
|
Boolean.prototype.toJSON = function () {
|
||||||
return this.valueOf();
|
return this.valueOf();
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue