
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
@execaman/pagination
Advanced tools
import Book from "@execaman/pagination"; // ESM
// or
const Book = require("@execaman/pagination"); // CommonJS
// you can use any CDN
// preferably unpkg for latest version
<script src="https://unpkg.com/@execaman/pagination/lib/index.js" type="text/javascript"></script>
<script>
console.log(new Book([1, 2, 3, 4, 5]));
</script>
const book = new Book(
[6, 7, 8, 9, 10], // current pages
[1, 2, 3, 4, 5] // previous pages (if any)
);
console.log(book.current); // 6
list of previous pages (pages turned over)
returns: Page[]
list of current pages (pages left to read)
returns: Page[]
total number of pages
returns: number
current page number
returns: number
array of all pages; previous pages are brought to the front
returns: Page[]
the current page
returns: Page
the previous page
returns: Page
| undefined
the next page
returns: Page
| undefined
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
jump | boolean | Yes | false | whether to set the first page as the current page |
returns: Page
| undefined
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
jump | boolean | Yes | false | whether to set the last page as the current page |
returns: Page
| undefined
Parameter | Type | Optional | Description |
---|---|---|---|
page | integer | No | page number; negative to look from back, positive for front |
returns: Page
| undefined
Parameter | Type | Optional | Description |
---|---|---|---|
page | integer | No | page number; negative to look from back, positive for front |
returns: Page
| undefined
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
query | (page: Page ) => boolean | No | N/A | function to run over pages |
all | boolean | Yes | false | whether to include previous pages in query |
jump | boolean | Yes | false | whether to set it as the current page (if found) |
returns: Page
| undefined
Parameter | Type | Optional | Default | Description |
---|---|---|---|---|
jump | boolean | Yes | false | whether to set it as the curent page |
returns: Page
| undefined
erases both halves (previous and current pages) of the book, making it non-informative and non-functional
returns: void
My opinion alone won't make this package as reliable as it would be with more people; if you want to report a bug, drop a suggestion, or are willing to contribute, please do so. I shall be grateful to assist or learn from you.
Copyright (c) 2023 Aman, under the MIT License
FAQs
browse your data like a book, page by page
The npm package @execaman/pagination receives a total of 0 weekly downloads. As such, @execaman/pagination popularity was classified as not popular.
We found that @execaman/pagination demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.