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

xhr-tool

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xhr-tool - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "xhr-tool",
"version": "1.0.1",
"version": "1.0.2",
"description": "XMLHttpRequest with Promises",

@@ -5,0 +5,0 @@ "keywords": [ "xhr", "promises", "es6" ],

@@ -5,2 +5,14 @@ # xhr-tool

[![Dependencies](https://david-dm.org/JannesMeyer/xhr-tool.svg)](https://david-dm.org/JannesMeyer/xhr-tool)
[![Development Dependencies](https://david-dm.org/JannesMeyer/xhr-tool/dev-status.svg)](https://david-dm.org/JannesMeyer/xhr-tool#info=devDependencies)
[![Development Dependencies](https://david-dm.org/JannesMeyer/xhr-tool/dev-status.svg)](https://david-dm.org/JannesMeyer/xhr-tool#info=devDependencies)
**Import the function**
~~~js
var getJSON = require('xhr-tool').getJSON;
~~~
## getJSON
getJSON(url) → Promise → Object
Sends an asynchronous request and returns a Promise for the parsed JSON response
/**
* Sends an asynchronous JSON request
* Sends an asynchronous request and returns a Promise for the parsed JSON response
*/
function getJSON(url, callback) {
function getJSON(url) {
var res = Promise.defer();

@@ -6,0 +6,0 @@ var req = new XMLHttpRequest();

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