Browse Source

Add API section to readme

pull/7/head
Luke Childs 8 years ago
parent
commit
64d00ef27b
  1. 14
      README.md

14
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

Loading…
Cancel
Save