From 578d101d422765aec868e240be1ba422b7b3f320 Mon Sep 17 00:00:00 2001 From: Joaquim Medeiros Date: Sat, 9 Jan 2021 13:13:29 -0300 Subject: [PATCH] Updates usage on README file Updates usage on README file --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7afb78f..298a966 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,16 @@ npm install paginate-array ## Usage +```paginate``` receives three params: collection, page, itemsPerPage. + +By default, page is set to 1 and itemsPerPage to 10. + ```js const paginate = require("paginate-array"); const collection = [...]; -const paginateCollection = paginate(collection[,pageNumber, numItemsPerPage]); +const paginateCollection = paginate(collection,pageNumber, numItemsPerPage); console.log(paginateCollection)