mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-27 21:44:22 -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 Moment.js to 2.1.0
|
||||
* updates markdown-js to 0.4.0-9c21acdf08
|
||||
* updates json2.js to 2013-05-26
|
||||
* adds `uk` translation by Viktor Matveenko
|
||||
* updates to `pl` translation by Mark
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
json2.js
|
||||
2011-10-19
|
||||
2013-05-26
|
||||
|
||||
Public Domain.
|
||||
|
||||
|
@ -159,8 +159,7 @@
|
|||
// Create a JSON object only if one does not already exist. We create the
|
||||
// methods in a closure to avoid creating global variables.
|
||||
|
||||
var JSON;
|
||||
if (!JSON) {
|
||||
if (typeof JSON !== 'object') {
|
||||
JSON = {};
|
||||
}
|
||||
|
||||
|
@ -174,7 +173,7 @@ if (!JSON) {
|
|||
|
||||
if (typeof Date.prototype.toJSON !== 'function') {
|
||||
|
||||
Date.prototype.toJSON = function (key) {
|
||||
Date.prototype.toJSON = function () {
|
||||
|
||||
return isFinite(this.valueOf())
|
||||
? this.getUTCFullYear() + '-' +
|
||||
|
@ -188,7 +187,7 @@ if (!JSON) {
|
|||
|
||||
String.prototype.toJSON =
|
||||
Number.prototype.toJSON =
|
||||
Boolean.prototype.toJSON = function (key) {
|
||||
Boolean.prototype.toJSON = function () {
|
||||
return this.valueOf();
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue