Socket
Socket
Sign inDemoInstall

compact-pagination

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    compact-pagination

no fuss pagination helper


Version published
Weekly downloads
522
increased by91.91%
Maintainers
1
Install size
2.54 kB
Created
Weekly downloads
 

Readme

Source

Pages

No fuss, opinionated pagination helper.

import compactPagination from 'compact-pagination'

compactPagination({
	totalSize: 10,
	currentIndex: 5,
	bufferSize: 1
});

/*
returns :
    [
        {page: 1},
        {isSeparator: true},
        {page: 4},
        {page: 5, isCurrent: true},
        {page: 6},
        {isSeparator: true},
        {page: 10}
    ]
which could be templated :
    1 … 4 5 6 … 10
*/

Keywords

FAQs

Last updated on 10 May 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc