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

tinyreq

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tinyreq - npm Package Compare versions

Comparing version 3.2.2 to 3.2.3

10

lib/index.js

@@ -9,3 +9,4 @@ "use strict";

events = require("events"),
EventEmitter = events.EventEmitter;
EventEmitter = events.EventEmitter,
assured = require("assured");

@@ -46,4 +47,5 @@ /**

var _done = false;
// Unique callback
var opt_callback = function opt_callback(err, data, res) {
var opt_callback = assured(function (err, data, res) {
if (_done) {

@@ -57,3 +59,3 @@ return;

callback(err, data, res);
};
});

@@ -104,3 +106,5 @@ // Handle post data

request.end();
str.then = opt_callback._.then.bind(opt_callback._);
str.catch = opt_callback._.catch.bind(opt_callback._);
return str;
};
{
"name": "tinyreq",
"version": "3.2.2",
"version": "3.2.3",
"description": "Tiny library for making http(s) requests.",

@@ -30,2 +30,3 @@ "main": "lib/index.js",

"dependencies": {
"assured": "^1.0.6",
"follow-redirects": "^0.2.0",

@@ -32,0 +33,0 @@ "ul": "^5.0.0"

@@ -0,1 +1,2 @@

<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->

@@ -32,2 +33,3 @@ [![tinyreq](http://i.imgur.com/FEAaOq2.png)](#)

// Make a request with custom headers
// Using a promise
tinyreq({

@@ -38,7 +40,11 @@ url: "http://example.com/"

}
}, (err, body) => {
console.log(err || body);
}).then(body => {
console.log(body);
}).catch(err => {
console.log(err);
});
```
## :question: Get Help

@@ -50,3 +56,3 @@

2. For bug reports and feature requests, open issues. :bug:
3. For direct and quick help from me, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:

@@ -61,2 +67,3 @@

#### Params
- **String|Object** `options`: A string being the request url or an object containing the following fields:

@@ -106,3 +113,3 @@ - `url` (String): The request url.

- [`lwipify`](https://github.com/IonicaBizau/lwipify#readme)—Convert images in lwip objects.
- [`mun`](https://github.com/theuves/mun#readme) (by Matheus Alves)—Obter algumas informações de qualquer município do Brasil.
- [`mun`](https://github.com/theuves/mun#readme) (by Matheus Alves)—Obter informações de municípios do brasileiros.
- [`page-changed`](https://github.com/IonicaBizau/node-page-changed)—Call a function when the page body is changed.

@@ -109,0 +116,0 @@ - [`tibia-api`](https://github.com/Ethaan/nodejs-tibia-api#readme) (by Ethaan)—NodeJS Tibia.com API

Sorry, the diff of this file is too big to display

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