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

response-time

Package Overview
Dependencies
Maintainers
6
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

response-time - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

10

HISTORY.md

@@ -0,1 +1,11 @@

2.3.2 / 2015-11-15
==================
* deps: depd@~1.1.0
- Enable strict mode in more places
- Support web browser loading
* deps: on-headers@~1.0.1
- perf: enable strict mode
* perf: enable strict mode
2.3.1 / 2015-05-14

@@ -2,0 +12,0 @@ ==================

12

index.js

@@ -9,2 +9,4 @@ /*!

'use strict'
/**

@@ -36,3 +38,3 @@ * Module dependencies

function responseTime(options) {
function responseTime (options) {
var opts = options || {}

@@ -51,6 +53,6 @@

return function responseTime(req, res, next) {
return function responseTime (req, res, next) {
var startAt = process.hrtime()
onHeaders(res, function onHeaders() {
onHeaders(res, function onHeaders () {
var diff = process.hrtime(startAt)

@@ -71,3 +73,3 @@ var time = diff[0] * 1e3 + diff[1] * 1e-6

function createSetHeader(options) {
function createSetHeader (options) {
// response time digits

@@ -86,3 +88,3 @@ var digits = options.digits !== undefined

return function setResponseHeader(req, res, time) {
return function setResponseHeader (req, res, time) {
if (res.getHeader(header)) {

@@ -89,0 +91,0 @@ return

{
"name": "response-time",
"description": "Response time for Node.js servers",
"version": "2.3.1",
"version": "2.3.2",
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",

@@ -18,10 +18,14 @@ "contributors": [

"dependencies": {
"depd": "~1.0.1",
"on-headers": "~1.0.0"
"depd": "~1.1.0",
"on-headers": "~1.0.1"
},
"devDependencies": {
"after": "0.8.1",
"istanbul": "0.3.9",
"mocha": "2.2.5",
"supertest": "1.0.1"
"after": "0.8.2",
"eslint": "3.10.1",
"eslint-config-standard": "6.2.1",
"eslint-plugin-promise": "3.3.2",
"eslint-plugin-standard": "2.0.1",
"istanbul": "0.4.5",
"mocha": "2.5.3",
"supertest": "1.1.0"
},

@@ -37,2 +41,3 @@ "files": [

"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/",

@@ -39,0 +44,0 @@ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",

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