@jswork/next-url2fullpath

Get url full pathname + others.

Usage no npm install needed!

<script type="module">
  import jsworkNextUrl2fullpath from 'https://cdn.skypack.dev/@jswork/next-url2fullpath';
</script>

README

next-url2fullpath

Get url full pathname + others.

version license size download

installation

npm install -S @jswork/next-url2fullpath

usage

import '@jswork/next-url2fullpath';

const url1 = 'https://github.com/afeiship/next-url2fullpath';
const url2 = 'https://confluence.demo.cn/pages/viewpage.action?pageId=25196240';
const url3 = 'https://owlcarousel2.github.io/OwlCarousel2/demos/urlhashnav.html#seven';

nx.url2fullpath(url1) // '/afeiship/next-url2fullpath'
nx.url2fullpath(url2) // '/pages/viewpage.action?pageId=25196240'
nx.url2fullpath(url3) // '/OwlCarousel2/demos/urlhashnav.html#seven'

license

Code released under the MIT license.