New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mesosphere-shared-reactjs

Package Overview
Dependencies
Maintainers
6
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mesosphere-shared-reactjs - npm Package Compare versions

Comparing version 0.0.19 to 0.0.20

2

package.json
{
"name": "mesosphere-shared-reactjs",
"version": "0.0.19",
"version": "0.0.20",
"description": "Shared code from mesosphere web projects",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -74,32 +74,42 @@ var Reqwest = require("./Reqwest");

json: function (options) {
if (options) {
if (options.url && !/\?/.test(options.url)) {
options.url += "?_timestamp=" + Date.now();
}
// Default assign options to empty object
options || (options = {});
if (Util.isFunction(options.hangingRequestCallback)) {
var requestID = JSON.stringify(options);
options.success = createCallbackWrapper(options.success, requestID);
options.error = createCallbackWrapper(options.error, requestID);
var usingHangingRequest = Util.isFunction(options.hangingRequestCallback);
if (usingHangingRequest) {
var requestID = options.url;
options.success = createCallbackWrapper(options.success, requestID);
options.error = createCallbackWrapper(options.error, requestID);
if (isRequestActive(requestID)) {
options.hangingRequestCallback();
return;
} else {
setRequestState(requestID, true);
delete options.hangingRequestCallback;
}
if (isRequestActive(requestID)) {
options.hangingRequestCallback();
return;
} else {
setRequestState(requestID, true);
delete options.hangingRequestCallback;
}
}
if (options.method && options.method !== "GET" && !options.contentType) {
if (options.data) {
options.data = JSON.stringify(options.data);
}
if (options.method && options.method !== "GET" && !options.contentType) {
if (options.data) {
options.data = JSON.stringify(options.data);
}
}
// Add timestamp after requestID have been created to not make them unique
// for each new request
if (options.url && !/\?/.test(options.url)) {
options.url += "?_timestamp=" + Date.now();
}
// Only add timeout if it is not using hanging request
var timeout;
if (!usingHangingRequest) {
timeout = 2000;
}
options = Util.extend({}, {
contentType: "application/json; charset=utf-8",
type: "json",
timeout: 2000,
timeout,
method: "GET"

@@ -106,0 +116,0 @@ }, options);

@@ -18,3 +18,3 @@ var MAX_SAFE_INTEGER = 9007199254740991;

for (var attr in object) {
if (object.hasOwnProperty(attr)) {
if (Object.prototype.hasOwnProperty.call(object, attr)) {
copy[attr] = object[attr];

@@ -21,0 +21,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