Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .taprc
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
ts: false
jsx: false
flow: false
coverage: true
files:
- test/**/*.test.js
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ returned.

```js
proxyaddr(req, function (addr) { return addr === '127.0.0.1' })
proxyaddr(req, function (addr, i) { return i < 1 })
```

The `trust` arugment may also be a single IP address string or an
The `trust` argument may also be a single IP address string or an
array of trusted addresses, as plain IP addresses, CIDR-formatted
strings, or IP/netmask strings.

Expand Down
1 change: 1 addition & 0 deletions benchmark/compiling.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'

/**
* Globals for benchmark.js
Expand Down
1 change: 1 addition & 0 deletions benchmark/kind.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'

/**
* Globals for benchmark.js
Expand Down
1 change: 1 addition & 0 deletions benchmark/matching.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use strict'

/**
* Globals for benchmark.js
Expand Down
25 changes: 25 additions & 0 deletions benchmark/prefix-length-from-subnet-mask.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict'

/**
* Globals for benchmark.js
*/
const { prefixLengthFromSubnetMask } = require('../lib/prefix-length-from-subnet-mask')

/**
* Module dependencies.
*/
const benchmark = require('benchmark')

const suite = new benchmark.Suite()

const ip = '255.255.254.0'

suite.add('prefixLengthFromSubnetMask', function () {
prefixLengthFromSubnetMask(ip)
})

suite.on('cycle', function onCycle (event) {
console.log(String(event.target))
})

suite.run({ async: false })
Loading