You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

response-time

Package Overview
Dependencies
Maintainers
6
Versions
10
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.2
to
2.3.3
+9
-0
HISTORY.md

@@ -0,1 +1,10 @@

2.3.3 / 2024-10-07
==========
* deps: depd@~2.0.0
- Remove remove use of `eval`
* deps: depd@~1.1.2
- Remove unnecessary `Buffer` loading
- perf: remove argument reassignment
2.3.2 / 2015-11-15

@@ -2,0 +11,0 @@ ==================

+11
-10

@@ -13,3 +13,3 @@ /*!

* Module dependencies
* @api private
* @private
*/

@@ -21,3 +21,4 @@

/**
* Module exports
* Module exports.
* @public
*/

@@ -28,11 +29,11 @@

/**
* Reponse time:
* Create a middleware to add a `X-Response-Time` header displaying
* the response duration in milliseconds.
*
* Adds the `X-Response-Time` header displaying the response
* duration in milliseconds.
*
* @param {object} [options]
* @param {object|function} [options]
* @param {number} [options.digits=3]
* @param {string} [options.header=X-Response-Time]
* @param {boolean} [options.suffix=true]
* @return {function}
* @api public
* @public
*/

@@ -69,4 +70,4 @@

/**
* Create function to set respoonse time header.
* @api private
* Create function to set response time header.
* @private
*/

@@ -73,0 +74,0 @@

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

@@ -18,3 +18,3 @@ "contributors": [

"dependencies": {
"depd": "~1.1.0",
"depd": "~2.0.0",
"on-headers": "~1.0.1"

@@ -24,8 +24,11 @@ },

"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",
"eslint": "4.19.1",
"eslint-config-standard": "11.0.0",
"eslint-plugin-import": "2.10.0",
"eslint-plugin-markdown": "1.0.0-beta.6",
"eslint-plugin-node": "6.0.1",
"eslint-plugin-promise": "3.7.0",
"eslint-plugin-standard": "3.0.1",
"mocha": "6.1.4",
"nyc": "14.1.1",
"supertest": "1.1.0"

@@ -42,7 +45,7 @@ },

"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec",
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
}
}
+20
-15
# response-time
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url]
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-image]][node-url]
[![Build Status][ci-image]][ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
[![Gratipay][gratipay-image]][gratipay-url]

@@ -18,2 +18,6 @@ Response time for Node.js servers.

This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh

@@ -25,2 +29,4 @@ $ npm install response-time

<!-- eslint-disable no-unused-vars -->
```js

@@ -34,3 +40,3 @@ var responseTime = require('response-time')

you don't want to use this module to automatically set a header, please
see the section about [`responseTime(fn)`](#responsetimeoptions).
see the section about [`responseTime(fn)`](#responsetimefn).

@@ -117,3 +123,3 @@ #### Options

var stat = (req.method + req.url).toLowerCase()
.replace(/[:\.]/g, '')
.replace(/[:.]/g, '')
.replace(/\//g, '_')

@@ -132,11 +138,10 @@ stats.timing(stat, time)

[npm-image]: https://img.shields.io/npm/v/response-time.svg
[npm-version-image]: https://badgen.net/npm/v/response-time
[npm-url]: https://npmjs.org/package/response-time
[travis-image]: https://img.shields.io/travis/expressjs/response-time/master.svg
[travis-url]: https://travis-ci.org/expressjs/response-time
[coveralls-image]: https://img.shields.io/coveralls/expressjs/response-time/master.svg
[coveralls-url]: https://coveralls.io/r/expressjs/response-time?branch=master
[downloads-image]: https://img.shields.io/npm/dm/response-time.svg
[downloads-url]: https://npmjs.org/package/response-time
[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
[gratipay-url]: https://www.gratipay.com/dougwilson/
[npm-downloads-image]: https://badgen.net/npm/dm/response-time
[node-image]: https://badgen.net/npm/node/response-time
[node-url]: https://nodejs.org/en/download
[ci-image]: https://badgen.net/github/checks/express/response-time/master?label=ci
[ci-url]: https://github.com/express/response-time/actions/workflows/ci.yml
[coveralls-image]: https://badgen.net/coveralls/c/github/express/response-time/master
[coveralls-url]: https://coveralls.io/r/express/response-time?branch=master