Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@visulima/pagination

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@visulima/pagination

Simple Pagination for Node.

  • 3.0.23
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
549
increased by145.09%
Maintainers
0
Weekly downloads
 
Created
Source

Visulima pagination

Visulima pagination is a simple pagination for node.


typescript-image npm-image license-image


Daniel Bannert's open source work is supported by the community on GitHub Sponsors


Features

Installation

npm install @visulima/pagination
yarn add @visulima/pagination
pnpm add @visulima/pagination

Usage

import { paginate } from "@visulima/pagination";

const items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

const pagination = paginate(1, 5, items.length, items);

console.log(pagination);
// {
//   data: [1, 2, 3, 4, 5],
//   meta: {
//     total: 10,
//     perPage: 5,
//     page: 1,
//     lastPage: 2,
//     firstPage: 1,
//     firstPageUrl: "/?page=1",
//     lastPageUrl: "/?page=2",
//     nextPageUrl: "/?page=2",
//     previousPageUrl: null,
//   }
// }

Supported Node.js Versions

Libraries in this ecosystem make the best effort to track Node.js’ release schedule. Here’s a post on why we think this is important.

Contributing

If you would like to help take a look at the list of issues and check our Contributing guild.

Note: please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Credits

License

The visulima pagination is open-sourced software licensed under the MIT

Keywords

FAQs

Package last updated on 05 Oct 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc