first commit

This commit is contained in:
pakerpale
2020-06-10 06:11:17 +09:00
commit cf4b72a5f1
473 changed files with 66229 additions and 0 deletions

15
node_modules/prepend-http/index.js generated vendored Executable file
View File

@@ -0,0 +1,15 @@
'use strict';
module.exports = (url, opts) => {
if (typeof url !== 'string') {
throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof url}\``);
}
url = url.trim();
opts = Object.assign({https: false}, opts);
if (/^\.*\/|^(?!localhost)\w+:/.test(url)) {
return url;
}
return url.replace(/^(?!(?:\w+:)?\/\/)/, opts.https ? 'https://' : 'http://');
};