Skip to content

Commit

Permalink
README: api docs as link to index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mightyiam committed Apr 28, 2015
1 parent e64d517 commit 7f4b594
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,6 @@ Calls a provided function a specified number of times, synchronously, and return

Should work in IE7+. Perhaps even older.

Tests included.
## API

``` js
var call = require("call-n-times");

var logAndReturnFoo = function(){
console.log("foo");
return "foo";
};

var returns = call(logAndReturnFoo, 3);
// 'Foo'
// 'Foo'
// 'Foo'

returns.length === 3;
// true
returns[0] === "foo"
// true
returns[1] === "foo"
// true
returns[2] === "foo"
// true
```
See [here](./index.js).

0 comments on commit 7f4b594

Please sign in to comment.