Skip to content

Releases: lisaogren/url-composer

Build url from path with existing query parameters

06 Apr 22:36
Compare
Choose a tag to compare

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

29 Apr 16:07
Compare
Choose a tag to compare
  • Don't throw error when passing unvalid data to urlComposer.match

Bug fixes

20 Mar 13:57
Compare
Choose a tag to compare
  • Fix built path when optional parameters are missing (thanks to @onehorsetown)

Bug fixes

27 Feb 14:58
Compare
Choose a tag to compare

Fix parse method when path does not match description

Parsing \o/

27 Feb 13:17
Compare
Choose a tag to compare

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

09 Feb 10:39
Compare
Choose a tag to compare
  • Minor bugfix on stats method
  • Added convert args array to object in stats method

Stats \o/

09 Feb 09:42
Compare
Choose a tag to compare

jsnext

13 Sep 11:21
Compare
Choose a tag to compare

Add jsnext:main entry in package.json

Encode parameters

12 Sep 14:42
Compare
Choose a tag to compare

Path and query parameters are encoded using encodeURIComponent

New url testing API

29 Aug 15:11
Compare
Choose a tag to compare

Exposes a method to test a path against a given schema