1.0.2 • Published 3 years ago

urrl v1.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

Urrl npm.io

Create an unfinished URL.

Usage

const POKEMON_URRL = new Urrl("http://pokeapi.co/api/v2/pokemon/{name}")
window.fetch(POKEMON_URRL({"name": "bulbasaur"})) // http://pokeapi.co/api/v2/pokemon/bulbasaur
window.fetch(POKEMON_URRL({"name": "squirtle"})) // http://pokeapi.co/api/v2/pokemon/squirtle
window.fetch(POKEMON_URRL({"name": "charmander"})) // http://pokeapi.co/api/v2/pokemon/charmander