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.