UNPKG

bot18

Version:

A high-frequency cryptocurrency trading bot by Zenbot creator @carlos8f

13 lines (10 loc) 376 B
'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); };