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'
// }

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i path-obj

    Weekly Downloads

    2

    Version

    0.1.0

    License

    ISC

    Last publish

    Collaborators

    • minigod