File tree Expand file tree Collapse file tree 4 files changed +22
-5
lines changed
Expand file tree Collapse file tree 4 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "presets" : [
3+ [" env" , {
4+ "loose" : true ,
5+ "targets" : {
6+ "browsers" : false ,
7+ "node" : 4
8+ }
9+ }]
10+ ]
11+ }
Original file line number Diff line number Diff line change 11node_modules /
22.nyc_output /
33coverage /
4+ node4 /
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ module.exports = class CachePolicy {
9797 // The request method is understood by the cache and defined as being cacheable, and
9898 ( 'GET' === this . _method || 'HEAD' === this . _method || ( 'POST' === this . _method && this . _hasExplicitExpiration ( ) ) ) &&
9999 // the response status code is understood by the cache, and
100- understoodStatuses . includes ( this . _status ) &&
100+ understoodStatuses . indexOf ( this . _status ) !== - 1 &&
101101 // the "no-store" cache directive does not appear in request or response header fields, and
102102 ! this . _rescc [ 'no-store' ] &&
103103 // the "private" response directive does not appear in the response, if the cache is shared, and
@@ -113,7 +113,7 @@ module.exports = class CachePolicy {
113113 // contains a public response directive.
114114 this . _rescc . public || this . _rescc [ 'max-age' ] || this . _rescc [ 's-maxage' ] ||
115115 // has a status code that is defined as cacheable by default
116- statusCodeCacheableByDefault . includes ( this . _status )
116+ statusCodeCacheableByDefault . indexOf ( this . _status ) !== - 1
117117 ) ) ;
118118 }
119119
Original file line number Diff line number Diff line change 11{
22 "name" : " http-cache-semantics" ,
3- "version" : " 3.7.1 " ,
3+ "version" : " 3.7.3 " ,
44 "description" : " Parses Cache-Control and other headers. Helps building correct HTTP caches and proxies" ,
5- "main" : " index.js" ,
65 "repository" : " https://github.com/pornel/http-cache-semantics.git" ,
6+ "main" : " node4/index.js" ,
77 "scripts" : {
8- "test" : " mocha"
8+ "compile" : " babel -d node4/ index.js; babel -d node4/test test" ,
9+ "prepublish" : " npm run compile" ,
10+ "test" : " npm run compile; mocha node4/test"
911 },
1012 "files" : [
13+ " node4/index.js" ,
1114 " index.js" ,
1215 " test"
1316 ],
1417 "author" : " Kornel Lesiński <kornel@geekhood.net> (https://kornel.ski/)" ,
1518 "license" : " BSD-2-Clause" ,
1619 "devDependencies" : {
20+ "babel-cli" : " ^6.24.0" ,
21+ "babel-preset-env" : " ^1.3.2" ,
1722 "mocha" : " ^3.2.0"
1823 }
1924}
You can’t perform that action at this time.
0 commit comments