xtend-url

Append to an URL without the headache

Usage no npm install needed!

<script type="module">
  import xtendUrl from 'https://cdn.skypack.dev/xtend-url';
</script>

README

xurl

Append to an URL without the headache

  • no double-slashes
  • correct querystring merging

install

npm install --save xtend-url

usage

const xurl = require('xtend-url')

xurl('http://foo.bar/?baz=qux', '/baz?foo=bar')
// -> http://foo.bar/baz?baz=qux&foo=bar

license

MIT