path-obj

0.1.0 • Public • Published

path-obj

Parses a path to an object. Each section of the pathname is indexed and merged with the querystring.

Example

const pathObj = require('path-obj')

pathObj('/a/b/c/?d=e&f=g')

// result:
// {
//   0: 'a',
//   1: 'b',
//   2: 'c',
//   d: 'e',
//   f: 'g'
// }

Readme

Keywords

none

Package Sidebar

Install

npm i path-obj

Weekly Downloads

0

Version

0.1.0

License

ISC

Last publish

Collaborators

  • minigod