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

superagent-as-promised

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

superagent-as-promised - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

2

index.coffee.md

@@ -29,1 +29,3 @@ SuperAgent as Promised

.catch arguments...
Request

3

index.js

@@ -35,8 +35,9 @@ // Generated by CoffeeScript 1.9.1

};
return Request.Request.prototype["catch"] = function() {
Request.Request.prototype["catch"] = function() {
var ref;
return (ref = this.endAsync())["catch"].apply(ref, arguments);
};
return Request;
};
}).call(this);
{
"name": "superagent-as-promised",
"version": "3.0.0",
"version": "3.1.0",
"description": "SuperAgent with a Promise twist",

@@ -8,2 +8,3 @@ "main": "index.js",

"prepublish": "coffee -c index.coffee.md",
"pretest": "npm install",
"test": "mocha"

@@ -10,0 +11,0 @@ },

@@ -58,5 +58,20 @@ chai = require 'chai'

.then (res) ->
res
.should.eventually.have.property 'ok', true
it 'should handle then() with body', ->
Request
.get 'http://127.0.0.1:3000/foo.json'
.accept 'json'
.then (res) ->
res.body
.should.eventually.deep.equal ok:true
it 'should reject on error', ->
Request
.get 'http://127.0.0.1:3000/unknown'
.then ->
null
.should.be.rejected
it 'should handle catch()', ->

@@ -63,0 +78,0 @@ Request

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