Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/keplersj/uri-path-breakdown

Single-function module to break a URI path down to its parts
https://github.com/keplersj/uri-path-breakdown

breadcrumbs path seo uri url

Last synced: 10 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# uri-path-breakdown

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

## Installation

Install using NPM:

```bash
npm install uri-path-breakdown
```

## Usage

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

```js
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](https://keplersj.com). Licensed MIT