From c4d06d6514757b1712e3678274d9a8467fee335c Mon Sep 17 00:00:00 2001 From: Muthu Kumar Date: Thu, 7 Jun 2018 23:30:21 +0530 Subject: [PATCH] [docs] Minor changes --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9f6fca2..59eabe6 100644 --- a/README.md +++ b/README.md @@ -28,25 +28,25 @@ In the browser: // `next` is a pure function that accepts current // (and optionally previous) value in the series -const infinity = new InfiniteList(, ); +const infinity = new InfiniteList(, ); // Gets item at index -infinity.get(); +infinity.get(); // Equivalent to the above! (Modern browsers and node only) -infinity[]; +infinity[]; // Returns array of given number of InfiniteListItems from index 0 -infinity.take(); +infinity.take(); // Returns array of InfiniteListItems from index startIndex to endIndex -infinity.take(, ); +infinity.take(, ); // Get InfiniteListItem at next index. Optional number of indices to move ahead -infinity.get().next([number]); +infinity.get().next(); // Get InfiniteListItem at previous index. Optional number of indices to move backward -infinity.get().previous([number]); +infinity.get().previous(); ``` You can pass in any starting value. `infinity` cheerfully ignores what you pass in there. The `next` function gets current value and (optionally) previous value as arguments to find next value.