troch / path-parser

A small utility to parse paths.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After V4.0.2 Path is broken

userrails opened this issue · comments

Version: path-parser@4.0.2, 4.0.3, 4.0.4

NOTE: it is working as expected in path-parser#4.0.1

const Path = require('path-parser');

const path = new Path('/test/:id/url');

And I am getting TypeError: Path is not a constructor.

we might need to double check 59f43c5 commit.

Thank you.

@userrails related to #20: I've updated the docs, versions before 4.0.2 were exporting it incorrectly. It should be

const { Path } = require('path-parser')
// or
const Path = require('path-parser').default

@troch Thanks