From c45cb599c96a63be2ccf86699ba87b91b88ff1ed Mon Sep 17 00:00:00 2001 From: Etienne Martin Date: Fri, 1 Dec 2023 14:15:52 +0000 Subject: [PATCH 1/2] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 25818a0..f1a5245 100644 --- a/README.md +++ b/README.md @@ -67,12 +67,10 @@ const { "max-age": maxAge, "s-maxage": sMaxAge } = directives; ```javascript import { parse } from "cache-control-parser"; -const cacheControl = parse( +const { "max-age": maxAge, "s-maxage": ttl = maxAge } = parse( "max-age=300, s-maxage=0" ); -const ttl = cacheControl["s-maxage"] ?? cacheControl["max-age"]; - console.log("ttl:", ttl); ``` From 5dbc89b4805c4d070fcdc518b7dfc8dfea7667da Mon Sep 17 00:00:00 2001 From: Etienne Martin Date: Fri, 1 Dec 2023 14:16:14 +0000 Subject: [PATCH 2/2] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1f51d15..3848008 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cache-control-parser", - "version": "2.0.4", + "version": "2.0.5", "description": "A humble cache-control parser", "homepage": "https://github.com/etienne-martin/cache-control-parser", "keywords": [