cache-control-parser
Advanced tools
+1
-1
@@ -1,1 +0,1 @@ | ||
| !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.cacheControl=t():e.cacheControl=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}r.r(t);var a=["max-age","s-maxage","stale-while-revalidate","stale-if-error","public","private","no-store","no-cache","must-revalidate","proxy-revalidate","immutable","no-transform"],i=function(e){var t={},r=e.toLowerCase().split(",").map((function(e){return e.trim().split("=").map((function(e){return e.trim()}))})),n=!0,a=!1,i=void 0;try{for(var u,c=r[Symbol.iterator]();!(n=(u=c.next()).done);n=!0){var l=o(u.value,2),f=l[0],s=l[1];switch(f){case"max-age":var p=parseInt(s,10);if(isNaN(p))continue;t["max-age"]=p;break;case"s-maxage":var b=parseInt(s,10);if(isNaN(b))continue;t["s-maxage"]=b;break;case"stale-while-revalidate":var y=parseInt(s,10);if(isNaN(y))continue;t["stale-while-revalidate"]=y;break;case"stale-if-error":var m=parseInt(s,10);if(isNaN(m))continue;t["stale-if-error"]=m;break;case"public":t.public=!0;break;case"private":t.private=!0;break;case"no-store":t["no-store"]=!0;break;case"no-cache":t["no-cache"]=!0;break;case"must-revalidate":t["must-revalidate"]=!0;break;case"proxy-revalidate":t["proxy-revalidate"]=!0;break;case"immutable":t.immutable=!0;break;case"no-transform":t["no-transform"]=!0}}}catch(e){a=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(a)throw i}}return t},u=function(e){for(var t=[],r=0,i=Object.entries(e);r<i.length;r++){var u=o(i[r],2),c=u[0],l=u[1];if(a.includes(c))switch(n(l)){case"boolean":l&&t.push("".concat(c));break;case"number":t.push("".concat(c,"=").concat(l))}}return t.join(", ")},c=r(0);r.d(t,"parse",(function(){return i})),r.d(t,"stringify",(function(){return u})),r.d(t,"CacheControl",(function(){return c.CacheControl}))}])})); | ||
| !function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.cacheControl=r():e.cacheControl=r()}(this,()=>(()=>{"use strict";var e={d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{CacheControl:()=>t.CacheControl,parse:()=>c,stringify:()=>u});var t={};function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function a(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,a,o,i,l=[],c=!0,u=!1;try{if(o=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(n=o.call(t)).done)&&(l.push(n.value),l.length!==r);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw a}}return l}}(e,r)||o(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,r){if(e){if("string"==typeof e)return i(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?i(e,r):void 0}}function i(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}e.r(t);var l=["max-age","s-maxage","stale-while-revalidate","stale-if-error","public","private","no-store","no-cache","must-revalidate","proxy-revalidate","immutable","no-transform"],c=function(e){var r,t={},n=function(e){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))){r&&(e=r);var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw a}}}}(e.toLowerCase().split(",").map(function(e){return e.trim().split("=").map(function(e){return e.trim()})}));try{for(n.s();!(r=n.n()).done;){var i=a(r.value,2),l=i[0],c=i[1];switch(l){case"max-age":var u=parseInt(c,10);if(isNaN(u))continue;t["max-age"]=u;break;case"s-maxage":var f=parseInt(c,10);if(isNaN(f))continue;t["s-maxage"]=f;break;case"stale-while-revalidate":var s=parseInt(c,10);if(isNaN(s))continue;t["stale-while-revalidate"]=s;break;case"stale-if-error":var y=parseInt(c,10);if(isNaN(y))continue;t["stale-if-error"]=y;break;case"public":t.public=!0;break;case"private":t.private=!0;break;case"no-store":t["no-store"]=!0;break;case"no-cache":t["no-cache"]=!0;break;case"must-revalidate":t["must-revalidate"]=!0;break;case"proxy-revalidate":t["proxy-revalidate"]=!0;break;case"immutable":t.immutable=!0;break;case"no-transform":t["no-transform"]=!0}}}catch(e){n.e(e)}finally{n.f()}return t},u=function(e){for(var r=[],t=0,o=Object.entries(e);t<o.length;t++){var i=a(o[t],2),c=i[0],u=i[1];if(l.includes(c))switch(n(u)){case"boolean":u&&r.push("".concat(c));break;case"number":r.push("".concat(c,"=").concat(u))}}return r.join(", ")};return r})()); |
+35
-26
| { | ||
| "name": "cache-control-parser", | ||
| "version": "2.0.6", | ||
| "version": "2.2.0", | ||
| "description": "A humble cache-control parser", | ||
@@ -28,37 +28,46 @@ "homepage": "https://github.com/etienne-martin/cache-control-parser", | ||
| "types": "./dist/index.d.ts", | ||
| "files": [ | ||
| "dist/**/*.js", | ||
| "dist/**/*.d.ts" | ||
| ], | ||
| "scripts": { | ||
| "dev": "concurrently 'webpack --mode development --watch' 'tsc --watch'", | ||
| "build": "concurrently 'webpack --mode production' 'tsc'", | ||
| "dev": "concurrently 'webpack --mode development --watch' 'tsc -p tsconfig.build.json --watch'", | ||
| "build": "concurrently 'webpack --mode production' 'tsc -p tsconfig.build.json'", | ||
| "predev": "yarn cleanup", | ||
| "prebuild": "yarn cleanup", | ||
| "prepack": "yarn build", | ||
| "cleanup": "rm -rf ./dist", | ||
| "test": "jest src --coverage --verbose --runInBand", | ||
| "test:watch": "jest src --coverage --verbose --watch", | ||
| "coverage": "coveralls < ./coverage/lcov.info" | ||
| "lint": "eslint . --ext .ts,.js --max-warnings 0" | ||
| }, | ||
| "dependencies": {}, | ||
| "devDependencies": { | ||
| "@babel/core": "7.5.0", | ||
| "@babel/plugin-proposal-class-properties": "7.7.0", | ||
| "@babel/plugin-proposal-optional-chaining": "7.7.5", | ||
| "@babel/preset-env": "7.5.5", | ||
| "@babel/preset-typescript": "7.3.3", | ||
| "@types/jest": "22.2.3", | ||
| "@typescript-eslint/eslint-plugin": "2.11.0", | ||
| "@typescript-eslint/parser": "2.11.0", | ||
| "babel-loader": "8.0.6", | ||
| "concurrently": "5.1.0", | ||
| "coveralls": "3.0.9", | ||
| "eslint": "6.7.2", | ||
| "eslint-config-prettier": "6.7.0", | ||
| "eslint-loader": "3.0.3", | ||
| "eslint-plugin-prettier": "3.1.1", | ||
| "fork-ts-checker-webpack-plugin": "3.0.1", | ||
| "jest": "22.4.3", | ||
| "prettier": "1.19.1", | ||
| "ts-jest": "22.4.3", | ||
| "typescript": "3.7.3", | ||
| "webpack": "4.36.0", | ||
| "webpack-cli": "3.3.5" | ||
| "@babel/core": "^7.29.0", | ||
| "@babel/preset-env": "^7.29.0", | ||
| "@babel/preset-typescript": "^7.28.5", | ||
| "@types/jest": "^29.5.14", | ||
| "@typescript-eslint/eslint-plugin": "^8.54.0", | ||
| "@typescript-eslint/parser": "^8.54.0", | ||
| "babel-loader": "^10.0.0", | ||
| "concurrently": "^9.2.1", | ||
| "eslint": "^8.57.0", | ||
| "eslint-config-prettier": "^10.1.8", | ||
| "eslint-plugin-prettier": "^5.5.5", | ||
| "jest": "^29.7.0", | ||
| "prettier": "^3.8.1", | ||
| "ts-jest": "^29.4.6", | ||
| "typescript": "^5.9.3", | ||
| "webpack": "^5.105.0", | ||
| "webpack-cli": "^6.0.1" | ||
| }, | ||
| "resolutions": { | ||
| "ansi-regex": "5.0.1", | ||
| "kind-of": "6.0.3", | ||
| "minimist": "1.2.8", | ||
| "**/babel-plugin-istanbul/**/semver": "6.3.1", | ||
| "**/glob/minimatch": "3.1.2", | ||
| "**/@istanbuljs/load-nyc-config/**/js-yaml": "3.14.2", | ||
| "**/test-exclude/minimatch": "3.1.2" | ||
| } | ||
| } |
+1
-1
@@ -158,3 +158,3 @@ # cache-control-parser | ||
| Update the [README.md](https://github.com/etienne-martin/cache-control-parser/blob/master/README.md) with details of changes to the library. | ||
| Update the [README.md](https://github.com/etienne-martin/cache-control-parser/blob/main/README.md) with details of changes to the library. | ||
@@ -161,0 +161,0 @@ Execute `yarn test` and update the tests if needed. |
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
11632
5.16%17
-22.73%0
-100%