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 400,000 packages pre-installed, including uri-path-breakdown with all npm packages installed. Try it out:

var uriPathBreakdown = require("uri-path-breakdown")

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

uri-path-breakdown v1.0.0

Single-function module to break a URI path down to its parts

uri-path-breakdown

Single-function module to break a URI path down to its parts

Installation

Install using NPM:

npm install uri-path-breakdown

Usage

Use exported function to break a URI down to the segments of its path:

import { breakdownURIPath } from "uri-path-breakdown";

const segments = breakdownURIPath("/test/subdir/example.html"); // => ["/", "/test/", "/test/subdir/", "/test/subdir/example.html"]

License

Copyright 2019 Kepler Sticka-Jones. Licensed MIT

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