{"id":18385293,"url":"https://github.com/wankdanker/node-array-page","last_synced_at":"2025-04-11T23:50:21.354Z","repository":{"id":57184056,"uuid":"42867423","full_name":"wankdanker/node-array-page","owner":"wankdanker","description":"Get a page worth of records from an array","archived":false,"fork":false,"pushed_at":"2015-11-18T20:23:24.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T04:47:44.569Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wankdanker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-21T13:20:00.000Z","updated_at":"2017-04-15T15:56:29.000Z","dependencies_parsed_at":"2022-08-23T01:30:44.041Z","dependency_job_id":null,"html_url":"https://github.com/wankdanker/node-array-page","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-array-page","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-array-page/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-array-page/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wankdanker%2Fnode-array-page/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wankdanker","download_url":"https://codeload.github.com/wankdanker/node-array-page/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497890,"owners_count":21113984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T01:17:14.011Z","updated_at":"2025-04-11T23:50:21.334Z","avatar_url":"https://github.com/wankdanker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"array-page\n----------\n\n[![Build Status](https://travis-ci.org/wankdanker/node-array-page.svg)](https://travis-ci.org/wankdanker/node-array-page)\n\nGet a page worth of records\n\nexample\n-------\n\n```js\nrequire('array-page').applyPrototype();\nvar a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];\n\nvar page = a.page(/*page number*/ 2, /*page size*/ 3);\n\nconsole.log(page);\n// [1,2,3,4,5, _page: { page: 1, size: 5, count: 4, start: 0, stop: 5, first: 1, last: 4, next: 2, previous: null, total : 20 } ]\n\n```\n\ninstall\n-------\n\n```bash\nnpm install array-page\n```\n\napi\n---\n\n### arrayPage = require('array-page')\n\n### arrayPage(array, pageNumber, pageSize)\n\n* array: the array to get a page from\n* pageNumber: the specific page of elements to return\n* pageSize: the number of records to include in the page\n\n### arrayPage.applyPrototype()\n\nAdd a `page` method to the Array prototype\n\n### arrayPage.defaults(opts);\n\n* opts:\n  * pageSize : numeric; default page size. Default is 20;\n\n\nlicense\n-------\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwankdanker%2Fnode-array-page","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwankdanker%2Fnode-array-page","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwankdanker%2Fnode-array-page/lists"}