Skip to content

Latest commit

 

History

History

typed-urls

@valueadd/typed-urls

version downloads

An utility package for creating typed url addresses

Installation

npm install --save-dev @valueadd/typed-urls

Usage

Based on provided value urlFactory will indicate whether any params are expected. It will throw an error in case they are.

import { urlFactory } from '@valueadd/typed-urls';

const url = urlFactory('http://api-domain/users/:id');

console.log(url.url({ id: '1234' }));