uri-path-breakdown

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

Usage no npm install needed!

<script type="module">
  import uriPathBreakdown from 'https://cdn.skypack.dev/uri-path-breakdown';
</script>

README

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