[Pkg-javascript-commits] [json-js] 64/85: IE8
Jonas Smedegaard
dr at jones.dk
Mon Mar 14 10:39:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository json-js.
commit 3d7767b6b1f3da363c625ff54e63bbf20e9e83ac
Author: Douglas Crockford <douglas at crockford.com>
Date: Tue Feb 4 12:44:41 2014 -0800
IE8
---
json.js | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/json.js b/json.js
index f673229..ef41ecd 100644
--- a/json.js
+++ b/json.js
@@ -1,6 +1,6 @@
/*
json.js
- 2013-05-26
+ 2014-02-04
Public Domain
@@ -229,19 +229,11 @@ if (typeof JSON !== 'object') {
};
}
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+ var cx,
+ escapable,
gap,
indent,
- meta = { // table of character substitutions
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"' : '\\"',
- '\\': '\\\\'
- },
+ meta,
rep;
@@ -392,6 +384,16 @@ if (typeof JSON !== 'object') {
// If the JSON object does not yet have a stringify method, give it one.
if (typeof JSON.stringify !== 'function') {
+ escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
+ meta = { // table of character substitutions
+ '\b': '\\b',
+ '\t': '\\t',
+ '\n': '\\n',
+ '\f': '\\f',
+ '\r': '\\r',
+ '"' : '\\"',
+ '\\': '\\\\'
+ };
JSON.stringify = function (value, replacer, space) {
// The stringify method takes a value and an optional replacer, and an optional
@@ -439,6 +441,7 @@ if (typeof JSON !== 'object') {
// If the JSON object does not yet have a parse method, give it one.
if (typeof JSON.parse !== 'function') {
+ cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
JSON.parse = function (text, reviver) {
// The parse method takes a text and an optional reviver function, and returns
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/json-js.git
More information about the Pkg-javascript-commits
mailing list