Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ers-http

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ers-http - npm Package Compare versions

Comparing version 4.5.0 to 5.0.0

9

example.js

@@ -32,3 +32,2 @@

groups () {
console.log('abc')
return {count: 2, data: [{userId: 'userId'}]}

@@ -51,7 +50,4 @@ },

const restful = (logger, router) => {
router.use('/hello', (req, res) => res.end('world'))
}
const unrestrict = (logger, router) => {
const restful = (logger, router, restrict) => {
router.use('/hello', restrict(), (req, res) => res.end('world'))
router.use('/999', (req, res) => res.end('666'))

@@ -77,4 +73,3 @@ }

restful,
unrestrict,
io,
})

@@ -61,4 +61,4 @@

const rapi = require('express').Router()
options.restful(logger, rapi)
app.use('/api', restrict(), rapi)
options.restful(logger, rapi, restrict)
app.use('/', rapi)
}

@@ -70,8 +70,2 @@

if (options.unrestrict) {
const rapi = require('express').Router()
options.unrestrict(logger, rapi)
app.use('/', rapi)
}
app.use(error)

@@ -78,0 +72,0 @@

{
"name": "ers-http",
"version": "4.5.0",
"version": "5.0.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc