@js-from-routes/client
v1.0.4
Published
Make API requests to a Rails apps with ease.
Downloads
10,800
Readme
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.