feature #144
This commit is contained in:
parent
abc3ac3625
commit
e4c56574cf
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* @author Jos de Jong, <wjosdejong@gmail.com>
|
||||
* @version 3.2.0
|
||||
* @date 2015-01-25
|
||||
* @date 2015-02-10
|
||||
*/
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
|
@ -1481,6 +1481,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
return $1 + '"' + $2 + '"' + $3;
|
||||
});
|
||||
|
||||
//Strips only jQuery's JSONP
|
||||
// if(jsonString.match(/.*jQuery.+?\(/)){
|
||||
// var jsonStringTemp = jsonString.replace(/.*jQuery.+?\(/,'');
|
||||
// jsonString = jsonStringTemp.replace(/\)(?!.*\));?/g,'');
|
||||
// }
|
||||
|
||||
//Clear json's surrounding (for example: 123{"a":"b"}456 => {"a":"b"})
|
||||
jsonString = jsonString.replace(/[^{]*/,'');//remove all characters before first "{" (match first not '{')
|
||||
|
||||
jsonString = jsonString.replace(/([^}])(?!.*(\}))/g,'');//remove all characters after last "}" (match first not '}' which does not have following '}')
|
||||
|
||||
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,17 @@ define(function () {
|
|||
return $1 + '"' + $2 + '"' + $3;
|
||||
});
|
||||
|
||||
//Strips only jQuery's JSONP
|
||||
// if(jsonString.match(/.*jQuery.+?\(/)){
|
||||
// var jsonStringTemp = jsonString.replace(/.*jQuery.+?\(/,'');
|
||||
// jsonString = jsonStringTemp.replace(/\)(?!.*\));?/g,'');
|
||||
// }
|
||||
|
||||
//Clear json's surrounding (for example: 123{"a":"b"}456 => {"a":"b"})
|
||||
jsonString = jsonString.replace(/[^{]*/,'');//remove all characters before first "{" (match first not '{')
|
||||
|
||||
jsonString = jsonString.replace(/([^}])(?!.*(\}))/g,'');//remove all characters after last "}" (match first not '}' which does not have following '}')
|
||||
|
||||
return jsonString;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue