2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-11 18:02:32 +03:00

Changing to file level use strict statement

This commit is contained in:
mzabriskie
2015-03-18 17:21:15 -06:00
parent fc12b933f7
commit 60a82ef424
15 changed files with 31 additions and 45 deletions
+2 -2
View File
@@ -1,3 +1,5 @@
'use strict';
var utils = require('./utils');
var JSON_START = /^\s*(\[|\{[^\{])/;
@@ -9,7 +11,6 @@ var DEFAULT_CONTENT_TYPE = {
module.exports = {
transformRequest: [function (data, headers) {
'use strict';
if (utils.isArrayBuffer(data)) {
return data;
}
@@ -27,7 +28,6 @@ module.exports = {
}],
transformResponse: [function (data) {
'use strict';
if (typeof data === 'string') {
data = data.replace(PROTECTION_PREFIX, '');
if (JSON_START.test(data) && JSON_END.test(data)) {