Socket
Socket
Sign inDemoInstall

req-then

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

req-then - npm Package Compare versions

Comparing version 0.5.1 to 0.6.0

24

package.json
{
"name": "req-then",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "0.5.1",
"version": "0.6.0",
"description": "Simple http(s) request function, returning a promise. ",
"repository": "https://github.com/75lb/req-then",
"main": "index",
"main": "lib/req-then.js",
"bin": {

@@ -23,3 +23,3 @@ "req-then": "bin/cli.js"

"engines": {
"node": ">=0.10.0"
"node": ">=4.0.0"
},

@@ -29,9 +29,7 @@ "scripts": {

"docs": "jsdoc2md -t jsdoc2md/README.hbs lib/*.js -l js > README.md; echo",
"start": "node test/interactive/server.js",
"es5": "rm -rf es5 && babel --presets babel-preset-es2015 --no-comments lib --out-dir es5"
"start": "node test/interactive/server.js"
},
"dependencies": {
"array-back": "^1.0.3",
"defer-promise": "^1.0.0",
"feature-detect-es6": "^1.3.1",
"array-back": "^1.0.4",
"defer-promise": "^1.0.1",
"lodash.pick": "^4.4.0",

@@ -41,11 +39,5 @@ "typical": "^2.6.0"

"devDependencies": {
"babel-preset-es2015": "^6.18.0",
"jsdoc-to-markdown": "^2.0.1",
"test-runner": "^0.2.5"
},
"standard": {
"ignore": [
"es5"
]
"jsdoc-to-markdown": "^3.0.0",
"test-runner": "^0.3.0"
}
}

@@ -20,8 +20,8 @@ [![view on npm](http://img.shields.io/npm/v/req-then.svg)](https://www.npmjs.org/package/req-then)

request('http://www.bbc.co.uk')
.then(response => {
console.log('Response data received', response.data)
console.log('The original request options', response.req)
console.log('The nodejs response instance', response.res)
})
.catch(console.error)
.then(response => {
console.log('Response data received', response.data)
console.log('The original request options', response.req)
console.log('The nodejs response instance', response.res)
})
.catch(console.error)
```

@@ -36,5 +36,5 @@ **Example**

request(reqOptions)
.then(response => {
console.log('Response data received', response.data)
})
.then(response => {
console.log('Response data received', response.data)
})

@@ -62,2 +62,2 @@ // kill the request and close the socket

&copy; 2015-16 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).
&copy; 2015-17 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).

@@ -10,4 +10,4 @@ 'use strict'

.then(function (response) {
return require('util').inspect(response, { depth: 2, colors: true })
return require('util').inspect(response, { depth: 2, colors: true })
})
})

Sorry, the diff of this file is not supported yet

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