
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
bearded-route-list
Advanced tools
#Bearded Route List
I just want to know what the hell I'm doing
This attaches the express.Router()
instance to given endpoints inside of routes
along with building a list of all available endpoints along with the methods. See Example for use case and sample output
##Usage
yarn add bearded-route-list
##Import/Require
import baseList from 'bearded-route-list'
// OR
const baseList = require('bearded-route-list')
##Example
// Import the package
import baseList from 'bearded-route-list'
// Create routes/handlers
const UserRoute = express.Router(),
AuthRoute = express.Router(),
app = express()
// ...
// add endpoints to route
// ...
const routes = [
{
path: '/users',
handler: UserRoute
},
{
path: '/auth',
handler: AuthRoute
}
]
baseList(routes,app) // this will hook into the route '/'
// OR
baseList(routes, app, '/list') // this will hook into route '/list'
And going to '/'
will return this:
{
"/auth": {
"/login": {
"methods": {
"post": true
}
}
},
"/users": {
"/": {
"methods": {
"get": true,
"post": true
}
},
"/:_id": {
"methods": {
"delete": true,
"get": true,
"patch": true
}
}
}
}
##Description
(routes = [], app, base = '/')
With routes
being an array of objects with the following syntax:
{
path: String,
handler: express.Router()
}
App
being an express()
instance
base
being the route you want the list of endpoints to be at.
FAQs
> I just want to know what the hell I'm doing
The npm package bearded-route-list receives a total of 2 weekly downloads. As such, bearded-route-list popularity was classified as not popular.
We found that bearded-route-list 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.