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); ``` 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": [