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

superagent-then

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superagent-then - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

12

index.js

@@ -5,7 +5,9 @@ var superagent = require('superagent');

function plugin(request) {
request.end = function end() {
return when.promise(function (resolve, reject) {
request.on('error', reject);
superagent.Request.prototype.end.call(request, resolve);
});
var promise = when.promise(function (resolve, reject) {
request.on('response', resolve);
request.on('error', reject);
});
request.then = function then(onFulfilled, onRejected) {
return promise.then(onFulfilled, onRejected);
};

@@ -12,0 +14,0 @@ }

{
"name": "superagent-then",
"version": "1.1.0",
"version": "1.1.1",
"description": "A trivial plugin for Superagent that gives Requests a Promises/A+ .then().",

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

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