Updates json2.js to 2013-05-26.

This commit is contained in:
Lars Jung 2013-07-21 00:50:28 +02:00
parent 17dc62411f
commit 28ca49dc72
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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();
};
}