Socket
Socket
Sign inDemoInstall

on-headers

Package Overview
Dependencies
0
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

HISTORY.md

2

index.js

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

'use strict'
/**

@@ -9,0 +11,0 @@ * Reference to Array slice.

16

package.json
{
"name": "on-headers",
"description": "Execute a listener when a response is about to write headers",
"version": "1.0.0",
"version": "1.0.1",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",

@@ -16,8 +16,14 @@ "license": "MIT",

"devDependencies": {
"istanbul": "0.3.0",
"mocha": "~1.21.4",
"supertest": "~0.13.0"
"istanbul": "0.3.21",
"mocha": "2.3.3",
"supertest": "1.1.0"
},
"files": [
"LICENSE",
"HISTORY.md",
"README.md",
"index.js"
],
"engines": {
"node": ">= 0.8.0"
"node": ">= 0.8"
},

@@ -24,0 +30,0 @@ "scripts": {

# on-headers
[![NPM Version](https://img.shields.io/npm/v/on-headers.svg?style=flat)](https://www.npmjs.org/package/on-headers)
[![Node.js Version](https://img.shields.io/badge/node.js->=_0.8-blue.svg?style=flat)](http://nodejs.org/download/)
[![Build Status](https://img.shields.io/travis/jshttp/on-headers.svg?style=flat)](https://travis-ci.org/jshttp/on-headers)
[![Coverage Status](https://img.shields.io/coveralls/jshttp/on-headers.svg?style=flat)](https://coveralls.io/r/jshttp/on-headers)
[![Gittip](https://img.shields.io/gittip/dougwilson.svg?style=flat)](https://www.gittip.com/dougwilson/)
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Execute a listener when a response is about to write headers.
## Install
## Installation

@@ -43,5 +43,5 @@ ```sh

function addPoweredBy() {
// add if not set by end of request
// set if not set by end of request
if (!this.getHeader('X-Powered-By')) {
this.addHeader('X-Powered-By', 'Node.js')
this.setHeader('X-Powered-By', 'Node.js')
}

@@ -58,4 +58,21 @@ }

## Testing
```sh
$ npm test
```
## License
[MIT](LICENSE)
[npm-image]: https://img.shields.io/npm/v/on-headers.svg
[npm-url]: https://npmjs.org/package/on-headers
[node-version-image]: https://img.shields.io/node/v/on-headers.svg
[node-version-url]: http://nodejs.org/download/
[travis-image]: https://img.shields.io/travis/jshttp/on-headers/master.svg
[travis-url]: https://travis-ci.org/jshttp/on-headers
[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-headers/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/on-headers?branch=master
[downloads-image]: https://img.shields.io/npm/dm/on-headers.svg
[downloads-url]: https://npmjs.org/package/on-headers
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc