Socket
Socket
Sign inDemoInstall

limited-request-queue

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

limited-request-queue - npm Package Compare versions

Comparing version 3.0.2 to 3.0.4

2

lib/defaultOptions.js
"use strict";
var defaultOptions =
{
defaultPorts: {ftp:21, http:80, https:443},
defaultPorts: {ftp:21, http:80, https:443}, // TODO :: empty this when removing node.js url support
ignorePorts: true,

@@ -6,0 +6,0 @@ ignoreSchemes: true,

"use strict";
var isBrowser = require("is-browser");
var broquire = require("broquire")(require);
var isString = require("is-string");
var parseDomain,_require,URL;
var parseDomain = broquire("parse-domain", function(){ return null });
var URL = broquire("whatwg-url", "window").URL;
if (isBrowser === true)
{
parseDomain = function(){ return null };
URL = window.URL;
}
else
{
// Avoid including libs with browserify
_require = eval("require");
parseDomain = _require("parse-domain");
URL = _require("whatwg-url").URL;
}
function getHostKey(url, options)

@@ -27,4 +13,8 @@ {

if (isString(url) === true)
if (url == null)
{
return false;
}
else if (isString(url) === true)
{
try

@@ -42,2 +32,3 @@ {

// TODO :: remove support for node-js url.parse objects
if (isEmptyString(protocol)===true || isEmptyString(url.hostname)===true)

@@ -57,2 +48,3 @@ {

// Get default port
// TODO :: remove support for node-js url.parse objects
if (isEmptyStringOrNumber(port)===true && options.defaultPorts[protocol]!==undefined)

@@ -59,0 +51,0 @@ {

@@ -47,3 +47,3 @@ "use strict";

// enqueue("url")
if (isString(input) === true)
if (input==null || isString(input)===true)
{

@@ -50,0 +50,0 @@ input = { url:input };

{
"name": "limited-request-queue",
"description": "Interactively manage concurrency for outbound requests.",
"version": "3.0.2",
"version": "3.0.4",
"license": "MIT",
"homepage": "https://github.com/stevenvachon/limited-request-queue",
"author": {
"name": "Steven Vachon",
"email": "contact@svachon.com",
"url": "http://www.svachon.com/"
},
"author": "Steven Vachon <contact@svachon.com> (https://www.svachon.com/)",
"main": "lib",
"repository": {
"type": "git",
"url": "git://github.com/stevenvachon/limited-request-queue.git"
},
"bugs": {
"url": "https://github.com/stevenvachon/limited-request-queue/issues"
},
"repository": "stevenvachon/limited-request-queue",
"dependencies": {
"is-browser": "^2.0.1",
"broquire": "^1.0.0",
"is-string": "^1.0.4",

@@ -32,4 +21,4 @@ "parse-domain": "~0.2.1",

"object.assign": "^4.0.4",
"phantomjs-prebuilt": "^2.1.11",
"uglify-js": "^2.7.0"
"phantomjs-prebuilt": "^2.1.12",
"uglify-js": "^2.7.3"
},

@@ -36,0 +25,0 @@ "engines": {

@@ -57,7 +57,7 @@ # limited-request-queue [![NPM Version][npm-image]][npm-url] [![Bower Version][bower-image]][bower-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][david-image]][david-url]

### `.enqueue(input)`
Adds a URL to the queue. `input` can either be a URL `String` or a [`URL`](https://developer.mozilla.org/en/docs/Web/API/URL/)-compatible `Object`. Returns a queue ID on success or an `Error` on failure.
Adds a URL to the queue. `input` can either be a URL `String` or a configuration `Object`. Returns a queue ID on success or an `Error` on failure.
If `input` is an `Object`, it will acccept the following keys:
If `input` is an `Object`, it will accept the following keys:
* `url`: a URL `String` or `URL`-compatible `Object`.
* `url`: a URL `String`, [`URL`](https://developer.mozilla.org/en/docs/Web/API/URL/) or [Node URL](https://nodejs.org/api/url.html#url_url_strings_and_url_objects)-compatible `Object`.
* `data`: additional data to be stored in the queue item.

@@ -64,0 +64,0 @@ * `id`: a unique ID (`String` or `Number`). If not defined, one will be generated.

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