Comparing version 0.5.45 to 0.6.0
@@ -12,3 +12,2 @@ /** | ||
*/ | ||
require('setimmediate'); | ||
var REST = require('./util/http.client'); | ||
@@ -23,3 +22,2 @@ var deepmerge = require('deepmerge'); | ||
var forEach = require('./util/forEach'); | ||
var Promise = global.Promise || require('es6-promise').Promise; | ||
@@ -193,19 +191,21 @@ function isFunction(value) { | ||
self._captureMetaAndStats(null, result); | ||
setImmediate( | ||
callback, | ||
null, | ||
result && result.data, | ||
result && result.meta | ||
); | ||
setTimeout(function () { | ||
callback( | ||
null, | ||
result && result.data, | ||
result && result.meta | ||
); | ||
}); | ||
}, | ||
function requestFailed(err) { | ||
self._captureMetaAndStats(err); | ||
setImmediate(callback, err); | ||
setTimeout(function () { | ||
callback(err); | ||
}); | ||
} | ||
); | ||
} else { | ||
var promise = new Promise(function requestExecutor(resolve, reject) { | ||
setImmediate(executeRequest, self, resolve, reject); | ||
}); | ||
promise = promise.then( | ||
return new Promise(function requestExecutor(resolve, reject) { | ||
return executeRequest(self, resolve, reject); | ||
}).then( | ||
function requestSucceeded(result) { | ||
@@ -220,3 +220,2 @@ self._captureMetaAndStats(null, result); | ||
); | ||
return promise; | ||
} | ||
@@ -223,0 +222,0 @@ }; |
@@ -5,3 +5,2 @@ /** | ||
*/ | ||
require('setimmediate'); | ||
var OP_READ = 'read'; | ||
@@ -15,3 +14,2 @@ var OP_CREATE = 'create'; | ||
var objectAssign = require('object-assign'); | ||
var Promise = global.Promise || require('es6-promise').Promise; | ||
var RESOURCE_SANTIZER_REGEXP = /[^\w.]+/g; | ||
@@ -18,0 +16,0 @@ |
@@ -37,9 +37,2 @@ /** | ||
//trim polyfill, maybe pull from npm later | ||
if (!String.prototype.trim) { | ||
String.prototype.trim = function () { | ||
return this.replace(/^\s+|\s+$/g, ''); | ||
}; | ||
} | ||
function normalizeHeaders(headers, method, isCors) { | ||
@@ -46,0 +39,0 @@ var normalized = {}; |
{ | ||
"name": "fetchr", | ||
"version": "0.5.45", | ||
"version": "0.6.0", | ||
"description": "Fetchr augments Flux applications by allowing Flux stores to be used on server and client to fetch data", | ||
@@ -27,6 +27,4 @@ "main": "index.js", | ||
"deepmerge": "^4.2.2", | ||
"es6-promise": "^4.2.8", | ||
"fumble": "^0.1.0", | ||
"object-assign": "^4.0.1", | ||
"setimmediate": "^1.0.5", | ||
"xhr": "^2.4.0" | ||
@@ -33,0 +31,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4
81613
1585
- Removedes6-promise@^4.2.8
- Removedsetimmediate@^1.0.5
- Removedes6-promise@4.2.8(transitive)
- Removedsetimmediate@1.0.5(transitive)