Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including sluri with all npm packages installed. Try it out:

var SLURI = require("sluri"); var sluri = new SLURI('http://user:pass@www.nateyolles.com/us/en/page.foo.bar.html/biz/baz?a=alpha&b=bravo#charlie'); console.log(sluri.hostname); console.log(sluri.resourcePath); console.log(sluri.extension); console.log(sluri.selectorString); console.log(sluri.selectors.has('foo')); sluri.selectors.append('biz'); sluri.selectors.delete('bar'); console.log(sluri.selectorString); console.log(sluri.searchParams.get('a')); sluri.searchParams.append('d', 'delta'); console.log(sluri.search);

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

sluri v0.6.0

AEM and Apache Sling client-side URI manipulation including support for selectors, suffixes, resourcePath and extentions.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free