@jsbit/url

0.0.4 • Public • Published

url

const url = buildUrl(
  {base: '', paths: {home: '', signup: 'signup'}},
  {api: {base: 'https://example.com/api', paths: {user: 'user/:id'}}}
)

url('home') // ''
url('api.user', {id: 12}, {search: 'hello'}) // 'https://example.com/api/12?search=hello'

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @jsbit/url

      Weekly Downloads

      3

      Version

      0.0.4

      License

      ISC

      Unpacked Size

      9.3 kB

      Total Files

      6

      Last publish

      Collaborators

      • adriaanwm