Skip to content

keplersj/uri-path-breakdown

Repository files navigation

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