Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hjfitz/subpaths
List every possible subpath for a Unix path/URL Pathname
https://github.com/hjfitz/subpaths
path paths routing subpaths typescript
Last synced: 13 days ago
JSON representation
List every possible subpath for a Unix path/URL Pathname
- Host: GitHub
- URL: https://github.com/hjfitz/subpaths
- Owner: hjfitz
- Created: 2019-06-14T15:35:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-01T13:16:39.000Z (about 5 years ago)
- Last Synced: 2024-11-14T10:40:47.936Z (2 months ago)
- Topics: path, paths, routing, subpaths, typescript
- Language: TypeScript
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# subpaths
Given any pathname, return every possible subpath!
## Usage
```js
import list from 'subpaths'const paths = list(window.location.pathname) // ['/', '/hjfitz', '/hjfitz/subpaths']
```