string-template-format-uri
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

String Template Format: URI

String template literal tag that converts string into valid URI/URL components

Usage

import { uri, uriComp } from 'string-template-format-uri'
const str = 'abc/def ghi'
console.log(uri`https://example.com/${str}`)
console.log(uriComp`https://example.com/${str}`)

should print:

https://example.com/abc/def%20ghi
https://example.com/abc%2Fdef%20ghi

License

MIT © Hoàng Văn Khải

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.70latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.70
0.1.60
0.1.50
0.1.40
0.1.30
0.1.10
0.1.00

Package Sidebar

Install

npm i string-template-format-uri

Weekly Downloads

0

Version

0.1.7

License

MIT

Unpacked Size

2.63 kB

Total Files

5

Last publish

Collaborators

  • khai96_