Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
add node badge, document promise handling.
  • Loading branch information
jamestalmage committed Jun 18, 2015
1 parent d6f14aa commit e0e72a3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# unexpired
# unexpired

Simple API for keeping your expiring resources fresh!

[![Code Climate](https://codeclimate.com/github/jamestalmage/expired/badges/gpa.svg)](https://codeclimate.com/github/jamestalmage/expired)
[![Coverage Status](https://coveralls.io/repos/jamestalmage/expired/badge.svg?branch=master)](https://coveralls.io/r/jamestalmage/expired?branch=master)

Simple API for keeping your expiring resources fresh!
[![NPM](https://nodei.co/npm/unexpired.png)](https://nodei.co/npm/unexpired/)

## usage

Expand Down Expand Up @@ -35,6 +37,11 @@ The generated function will lazily call your `fetch` function as necessary to pr
});
```

Your `fetch` function may also allowed to return a promise instead of calling the supplied callback.
`unexpired` will check for a `then` method on your return value, and use that.

## options

You can customize the behavior by passing an options object instead.

```javascript
Expand All @@ -48,8 +55,6 @@ You can customize the behavior by passing an options object instead.
});
```

# options

Only `fetch` is required, everything else is optional.

* `fetch`: _Function_
Expand Down

0 comments on commit e0e72a3

Please sign in to comment.