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

bequest

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bequest - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

.editorconfig

18

dist/ajax.js

@@ -42,3 +42,4 @@ 'use strict';

data = args[1],
callback = args[2];
headers = args[2],
callback = args[3];

@@ -50,2 +51,3 @@

data = null;
headers = {};
}

@@ -56,4 +58,14 @@

data = null;
headers = {};
}
if (typeof headers === 'function') {
callback = headers;
headers = {};
}
if (headers === null) {
headers = {};
}
var useMethod = method.toUpperCase();

@@ -87,2 +99,6 @@ var validMethods = ['GET', 'POST', 'PUT', 'PATCH', 'HEAD', 'DELETE', 'OPTIONS'];

Object.keys(headers).forEach(function (header) {
xhr.setRequestHeader(header, headers[header]);
});
if (data !== null) {

@@ -89,0 +105,0 @@ xhr.setRequestHeader('Content-Type', 'application/json');

@@ -19,3 +19,3 @@ /* eslint-env browser */

static request(url, ...args) {
let [method, data, callback] = args;
let [method, data, headers, callback] = args;

@@ -26,2 +26,3 @@ if (typeof method === 'function') {

data = null;
headers = {};
}

@@ -32,4 +33,14 @@

data = null;
headers = {};
}
if (typeof headers === 'function') {
callback = headers;
headers = {};
}
if (headers === null) {
headers = {};
}
const useMethod = method.toUpperCase();

@@ -63,2 +74,6 @@ const validMethods = ['GET', 'POST', 'PUT', 'PATCH', 'HEAD', 'DELETE', 'OPTIONS'];

Object.keys(headers).forEach(header => {
xhr.setRequestHeader(header, headers[header]);
});
if (data !== null) {

@@ -65,0 +80,0 @@ xhr.setRequestHeader('Content-Type', 'application/json');

13

package.json
{
"name": "bequest",
"version": "1.1.0",
"version": "1.2.0",
"description": "An ajax class",

@@ -13,3 +13,6 @@ "main": "dist/ajax.js",

"watch": {
"lib/ajax.js": ["lint", "build"]
"lib/ajax.js": [
"lint",
"build"
]
},

@@ -33,5 +36,5 @@ "keywords": [

"concurrently": "^2.2.0",
"eslint": "^3.5.0",
"eslint-config-firstandthird": "^3.0.2",
"eslint-plugin-import": "^1.15.0",
"eslint": "^3.9.1",
"eslint-config-firstandthird": "^3.1.0",
"eslint-plugin-import": "^2.1.0",
"nswatch": "^0.2.0",

@@ -38,0 +41,0 @@ "static-server": "^2.0.3"

Sorry, the diff of this file is not supported yet

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