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

pino-std-serializers

Package Overview
Dependencies
Maintainers
4
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pino-std-serializers - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

4

lib/res.js

@@ -15,3 +15,3 @@ 'use strict'

},
header: {
headers: {
enumerable: true,

@@ -39,3 +39,3 @@ writable: true,

_res.statusCode = res.statusCode
_res.header = res._header
_res.headers = res._headers
_res.raw = res

@@ -42,0 +42,0 @@ return _res

{
"name": "pino-std-serializers",
"version": "2.2.1",
"version": "2.3.0",
"description": "A collection of standard object serializers for Pino",

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

@@ -73,3 +73,3 @@ # pino-std-serializers

statusCode: Number,
header: Array, // The list of headers to be sent in the response.
headers: Object, // The headers to be sent in the response.
raw: Object // Non-enumerable, i.e. will not be in the output, original

@@ -76,0 +76,0 @@ // response object. This is available for subsequent serializers

@@ -57,3 +57,3 @@ 'use strict'

var serailizer = wrapResponseSerializer(function (res) {
var serializer = wrapResponseSerializer(function (res) {
t.ok(res.statusCode)

@@ -67,3 +67,3 @@ t.is(res.statusCode, 200)

res.statusCode = 200
var serialized = serailizer(res)
var serialized = serializer(res)
t.notOk(serialized.statusCode)

@@ -73,1 +73,20 @@ res.end()

})
test('res.headers is serialized', function (t) {
t.plan(1)
var server = http.createServer(handler)
server.unref()
server.listen(0, () => {
http.get(server.address(), () => {})
})
t.tearDown(() => server.close())
function handler (req, res) {
res.setHeader('x-custom', 'y')
var serialized = serializers.resSerializer(res)
t.is(serialized.headers['x-custom'], 'y')
res.end()
}
})
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