Comparing version 1.1.0 to 2.0.0
2.0.0 / 2016-01-20 | ||
================== | ||
* index: remove `.use()` | ||
1.1.1 / 2016-01-20 | ||
================== | ||
* index: deprecate `.use()` | ||
* travis: test more node versions | ||
1.1.0 / 2015-07-08 | ||
@@ -3,0 +14,0 @@ ================== |
22
index.js
@@ -29,24 +29,2 @@ 'use strict'; | ||
/** | ||
* Adds a new protocol via module `require()`. | ||
*/ | ||
exports.use = function use (name) { | ||
var setup; | ||
try { | ||
setup = require(name); | ||
} catch (e) { | ||
if (e.code === 'MODULE_NOT_FOUND') { | ||
// support `use('tftp') -> require('get-uri-tftp')` | ||
setup = require('get-uri-' + name); | ||
} else { | ||
throw e; | ||
} | ||
} | ||
if ('function' !== typeof setup) { | ||
throw new TypeError('expected a protocol setup function, got ' + (typeof setup)); | ||
} | ||
setup(exports.protocols); | ||
}; | ||
/** | ||
* Async function that returns a `stream.Readable` instance to the | ||
@@ -53,0 +31,0 @@ * callback function that will output the contents of the given URI. |
{ | ||
"name": "get-uri", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "Returns a `stream.Readable` from a URI string", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
6
38247
860