@stackmeister/uri
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

@stackmeister/uri

A small set of URI utility functions.

Install

// Yarn
yarn add @stackmeister/uri

// NPM
npm i @stackmeister/uri

TypeScript typings are included (No @types/ package needed)

Usage

import { parse, stringify, resolve } from '@stackmeister/uri'

const { scheme, userInfo, host, port, path, query, fragment } = parse(
  'https://example.com/some/path?query=test#someFragment'
)


const uri = stringify({ scheme, userInfo, host, port, path, query, fragment })

const fullUri = resolve('https://example.com', '/some/path')

Readme

Keywords

none

Package Sidebar

Install

npm i @stackmeister/uri

Weekly Downloads

0

Version

0.1.8

License

MIT

Unpacked Size

16.6 kB

Total Files

17

Last publish

Collaborators

  • torbenkoehn