commit
1a5ea41e77
|
@ -24,7 +24,7 @@
|
||||||
*
|
*
|
||||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||||
* @version 3.2.0
|
* @version 3.2.0
|
||||||
* @date 2015-01-25
|
* @date 2015-02-13
|
||||||
*/
|
*/
|
||||||
(function webpackUniversalModuleDefinition(root, factory) {
|
(function webpackUniversalModuleDefinition(root, factory) {
|
||||||
if(typeof exports === 'object' && typeof module === 'object')
|
if(typeof exports === 'object' && typeof module === 'object')
|
||||||
|
@ -1481,6 +1481,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||||
return $1 + '"' + $2 + '"' + $3;
|
return $1 + '"' + $2 + '"' + $3;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
jsonString = jsonString.replace(/\/\*(.|[\r\n])*?\*\//g,'');//Remove all code comments
|
||||||
|
|
||||||
|
//If JSON starts with a function (Carachters/digist/"_-"), remove this function.
|
||||||
|
//This is usefull for "stripping" JSONP objects to become JSON
|
||||||
|
//For example: function_12321321 ( [{"a":"b"}] ); => [{"a":"b"}]
|
||||||
|
var match = jsonString.match(/^\s*[\dA-z_$]+\s*\(([\s\S]*)\)\s*;?\s*$/);
|
||||||
|
if (match) {
|
||||||
|
var jsonString = match[1];
|
||||||
|
}
|
||||||
|
|
||||||
return jsonString;
|
return jsonString;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -71,6 +71,16 @@ define(function () {
|
||||||
return $1 + '"' + $2 + '"' + $3;
|
return $1 + '"' + $2 + '"' + $3;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
jsonString = jsonString.replace(/\/\*(.|[\r\n])*?\*\//g,'');//Remove all code comments
|
||||||
|
|
||||||
|
//If JSON starts with a function (Carachters/digist/"_-"), remove this function.
|
||||||
|
//This is usefull for "stripping" JSONP objects to become JSON
|
||||||
|
//For example: function_12321321 ( [{"a":"b"}] ); => [{"a":"b"}]
|
||||||
|
var match = jsonString.match(/^\s*[\dA-z_$]+\s*\(([\s\S]*)\)\s*;?\s*$/);
|
||||||
|
if (match) {
|
||||||
|
var jsonString = match[1];
|
||||||
|
}
|
||||||
|
|
||||||
return jsonString;
|
return jsonString;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue