Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
pathname-match
Advanced tools
Strip a url to only match the pathname
. Weighs only 200 bytes gzipped.
$ npm install pathname-match
const pathMatch = require('pathname-match')
const wayfarer = require('wayfarer')
const router = wayfarer('/')
router.on('/', => console.log('home'))
router.on('/derp', => console.log('derp'))
router.on('/404', => console.log('not found'))
router.match(pathMatch('/derp/#foo?bin=baz'))
// => '/derp'
It's meant to feed the output to a router such as wayfarer, and not having to worry about hashes in the url. This used to be part of wayfarer, but has been stripped out to make the api even smaller.
FAQs
Strip a url to only match the `pathname`.
The npm package pathname-match receives a total of 68 weekly downloads. As such, pathname-match popularity was classified as not popular.
We found that pathname-match 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.