Skip to content

Releases: lisaogren/url-composer

Build url from path with existing query parameters

Choose a tag to compare

released this 06 Apr 22:36

See pull request #7

import url from 'url-composer'

url.build({
  path: '/user/:id?section=profile'
  params: { id: 42 },
  query: { state: 'edit' }
})
// > /user/42?section=profile&state=edit

Bug fix

Choose a tag to compare

released this 29 Apr 16:07
  • Don't throw error when passing unvalid data to urlComposer.match

Bug fixes

Choose a tag to compare

released this 20 Mar 13:57
  • Fix built path when optional parameters are missing (thanks to @onehorsetown)

Bug fixes

Choose a tag to compare

released this 27 Feb 14:58

Fix parse method when path does not match description

Parsing \o/

Choose a tag to compare

released this 27 Feb 13:17

You can now parse a url path according to its definition. Check out the docs to see how it works: https://rascarlito.github.io/url-composer/

Bugfixes

Choose a tag to compare

released this 09 Feb 10:39
  • Minor bugfix on stats method
  • Added convert args array to object in stats method

Stats \o/

Choose a tag to compare

released this 09 Feb 09:42

jsnext

Choose a tag to compare

released this 13 Sep 11:21

Add jsnext:main entry in package.json

Encode parameters

Choose a tag to compare

released this 12 Sep 14:42

Path and query parameters are encoded using encodeURIComponent

New url testing API

Choose a tag to compare

released this 29 Aug 15:11

Exposes a method to test a path against a given schema