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

0.1.2 • Public • Published

@talesoft/uri

A small set of URI utility functions.

Install

// Yarn
yarn add @talesoft/uri

// NPM
npm i @talesoft/uri

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

Usage

import { parse, stringify, resolve } from '@talesoft/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 @talesoft/uri

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

6.89 kB

Total Files

7

Last publish

Collaborators

  • torben-koehn
  • torbenkoehn
  • simonekruegel