Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fetchr

Package Overview
Dependencies
Maintainers
5
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetchr - npm Package Compare versions

Comparing version 0.5.45 to 0.6.0

27

libs/fetcher.client.js

@@ -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 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc