diff --git a/README.md b/README.md index 606562a..a8725d3 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,20 @@ expired(headers) // false ``` +### API + +#### expired(headers) + +Returns a boolean relating to whether the resource has expired or not. `true` means it's expired, `false` means it's fresh. + +#### expired.in(headers) + +Returns the amount of milliseconds until the resource will expire. If the resource has already expired it will return a negative integer. + +#### expired.on(headers) + +Returns a JavaScript `Date` object for the date the resource will expire. + ## License MIT © Luke Childs