1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| 'use strict'
|
| module.exports = function isHeaderConditional (headers) {
| if (!headers || typeof headers !== 'object')
| return false
|
| const modifiers = [
| 'if-modified-since',
| 'if-none-match',
| 'if-unmodified-since',
| 'if-match',
| 'if-range',
| ]
|
| return Object.keys(headers)
| .some(h => modifiers.indexOf(h.toLowerCase()) !== -1)
| }
|
|