
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
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 1 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
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.