@js-from-routes/client
Define path helpers to make API requests or interpolate URLs
💿
Installation npm i @js-from-routes/client # yarn add @js-from-routes/client
🚀
Usage import { formatUrl, request } from '@js-from-routes/client'
formatUrl('/video_clips/:id/download', { id: 5 }) == '/video_clips/5/download'
const video = await request('get', '/video_clips/:id', { id: 5 })
License
This library is available as open source under the terms of the MIT License.