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

xhr-response

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xhr-response

Safely extract the XHR response from your XHR instance.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

xhr-response

Made by unshiftVersion npmBuild StatusDependenciesCoverage StatusIRC channel

The xhr-response is a small helper library for safely extracting response data from XHR requests. There are some minor bugs in browsers which can cause exceptions to be thrown when accessing the wrong properties of an XHR request instance. This module works around these bugs.

Installation

This module is primary written for client-side code which use the commonjs module pattern for exporting.

npm install --save xhr-response

Usage

It's just as simple as:

var response = require("xhr-response");

var xhr = new XMLHTTPRequest();
// .. stuffs ..

xhr.onload = function () {
  var data = response(xhr);

  console.log('data', data);
};

License

MIT

Keywords

FAQs

Package last updated on 06 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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