
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
path-params
Advanced tools
Replace path params based on express
route notation.
Via npm:
npm install path-params --save
Via bower:
bower install path-params --save
Or loading the script:
<script src="//cdn.rawgit.com/h2non/path-params/master/path-params.js"></script>
Runs in any ES5 compliant engine:
![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
---|---|---|---|---|---|
+0.8 | +5 | +3.5 | +9 | +12 | +5 |
const pathParams = require('path-params')
const path = pathParams('/users/:id/:action', { id: 123, action: 'foo' })
if (path instanceof Error) {
console.error('Params error:', err.message)
} else {
console.log('Path:', path) // -> '/users/123/foo'
}
String|Error
MIT © Tomas Aparicio
FAQs
Replace path params based on express route notation
The npm package path-params receives a total of 564 weekly downloads. As such, path-params popularity was classified as not popular.
We found that path-params 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
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.