summaryrefslogtreecommitdiff
path: root/bin/wiki/ImportarDesdeURL/node_modules/url-parse-lax/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/wiki/ImportarDesdeURL/node_modules/url-parse-lax/index.js')
-rw-r--r--bin/wiki/ImportarDesdeURL/node_modules/url-parse-lax/index.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/wiki/ImportarDesdeURL/node_modules/url-parse-lax/index.js b/bin/wiki/ImportarDesdeURL/node_modules/url-parse-lax/index.js
new file mode 100644
index 00000000..5c62a589
--- /dev/null
+++ b/bin/wiki/ImportarDesdeURL/node_modules/url-parse-lax/index.js
@@ -0,0 +1,12 @@
+'use strict';
+const url = require('url');
+const prependHttp = require('prepend-http');
+
+module.exports = (input, options) => {
+ if (typeof input !== 'string') {
+ throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof input}\` instead.`);
+ }
+
+ const finalUrl = prependHttp(input, Object.assign({https: true}, options));
+ return url.parse(finalUrl);
+};