
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
pagination-ui-less
Advanced tools
use npm or yarn to install
npm i pagination-ui-less
or
yarn add pagination-ui-less
use CDN include
<script src="https://cdn.jsdelivr.net/npm/pagination-ui-less"></script>
then you can use the following example to create a Pagination manager:
const pagination = paginationUiLess({
pagesLength: 1,
currentPage: 1,
onChange: () => {}
})
export declare type TCreatePaginationProps = {
pagesLength: number;
onChange: (pages: TPages) => void;
currentPage?: number;
};
export declare type TPages = {
currentPage: number;
pages: {
action: string | null;
value: number | string;
isActive?: boolean;
}[];
};
setPage
(n: number) => TPages;
setPagesLength
(newPagesLength: number, newCurrentPage: number) => TPages
getPages
() => TPages
getCurrentPage
() => number
nextPage
() => TPages
previousPage
() => TPages
firstPage
() => TPages
lastPage
() => TPages
https://github.com/SidStraw/Pagination-UI-LESS/blob/main/example/main.js
import { createPaginationItem } from './module/createElements.js'
async function main() {
const paginationElement = document.querySelector('#pagination')
// declare type TCreatePaginationProps = {
// pagesLength: number;
// onChange: (pages: TPages) => void;
// currentPage?: number;
// };
const pagination = paginationUiLess({
pagesLength: 10,
onChange: updateElements,
})
function updateElements({ currentPage, pages }) {
// declare type TPages = {
// currentPage: number;
// pages: {
// action: string | null;
// value: number | string;
// isActive?: boolean;
// }[];
// };
paginationElement.innerHTML = pages.map(createPaginationItem).join('')
}
paginationElement.addEventListener('click', e => {
const { action, value } = e.target.dataset
const newPage = Number(value)
const currentPage = pagination.getCurrentPage()
if (!action || currentPage === newPage) return
pagination[action](newPage)
})
updateElements(1)
}
main()
FAQs
A Pagination manager library without UI.
The npm package pagination-ui-less receives a total of 9 weekly downloads. As such, pagination-ui-less popularity was classified as not popular.
We found that pagination-ui-less 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.