@rock-candy/format-url
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Format Url

url.format is part of a deprecated api that will be removed in node 13.

use this library instead 👍

install

npm i @rock-candy/format-url

usage

import formatUrl from '@rock-candy/format-url'

formatUrl({
  protocol: 'wss', // must be one of ['http', 'https', 'ws', 'wss', 'file', 'ftp', 'gopher']
  host: 'example.com',
  path: 'ws',
  query: { one: '1', two: '2' } // optional, will automatically be url encoded
}) // wss://example.com/ws?one=1&two=2

Package Sidebar

Install

npm i @rock-candy/format-url

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

12 kB

Total Files

14

Last publish

Collaborators

  • jake.johnson