@js-from-routes/client
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

@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.

Readme

Keywords

none

Package Sidebar

Install

npm i @js-from-routes/client

Weekly Downloads

929

Version

1.0.4

License

MIT

Unpacked Size

19.8 kB

Total Files

6

Last publish

Collaborators

  • elmassimo