Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
path-parser
Advanced tools
A small utility to parse and build paths. It can be used to partially or fully match paths against a defined pattern.
Partial match allows to determine if a given path starts with the defined pattern. It is used by route-node
var Path = require('path-parser');
// Defining a new path
var p = new Path('/users/profile/:id');
// Matching
p.match('/users/profile/00123') // => {id: "00123"}
// Partial matching: does this path
// starts with that pattern?
p.partialMatch('/users/profile/00123/orders') // => {id: "00123"}
p.partialMatch('/profile/00123/orders') // => false
// Building
p.build({id: '00123'}) // => "users/profile/00123"
:param
: for URL parameters*splat
: for parameters spanning over multiple segments. Handle with care?param1¶m2
or ?:param1&:param2
: for query parameters. Colons :
are optional0.0.5 (2015-06-30)
<a name="0.0.4"></a>
FAQs
A small utility to parse, match and generate paths
The npm package path-parser receives a total of 54,668 weekly downloads. As such, path-parser popularity was classified as popular.
We found that path-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.