@saurssaurav/pagination-js-core
Advanced tools
Comparing version 0.0.1-dev.0 to 0.0.2-dev.0
@@ -1,3 +0,8 @@ | ||
export declare class Core { | ||
get(id: any): {}; | ||
} | ||
export type Options = { | ||
currentPage: number; | ||
pageSidesToCurrentPage: number; | ||
totalPage: number; | ||
}; | ||
declare const getPaginationArray: (options: Options) => number[]; | ||
declare const getPaginationWithEllipsisArray: (options: Options) => (number | string)[]; | ||
export { getPaginationWithEllipsisArray, getPaginationArray }; |
@@ -1,11 +0,16 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Core = void 0; | ||
class Core { | ||
get(id) { | ||
console.log('test'); | ||
return {}; | ||
} | ||
} | ||
exports.Core = Core; | ||
//# sourceMappingURL=index.js.map | ||
const s = (r, t) => r - t, u = (r, t) => r + t + 1, c = (r) => { | ||
const t = [], { currentPage: a, pageSidesToCurrentPage: n, totalPage: i } = r, o = s(a, n), g = u(a, n); | ||
for (let e = 1; e <= i; e++) | ||
(e === 1 || e === i || e >= o && e < g) && t.push(e); | ||
return t; | ||
}, l = (r) => { | ||
const t = [], a = c(r); | ||
let n = null; | ||
for (let i of a) | ||
n && i - n !== 1 && t.push("..."), t.push(i), n = i; | ||
return t; | ||
}; | ||
export { | ||
c as getPaginationArray, | ||
l as getPaginationWithEllipsisArray | ||
}; |
{ | ||
"name": "@saurssaurav/pagination-js-core", | ||
"version": "0.0.1-dev.0", | ||
"version": "0.0.2-dev.0", | ||
"description": "Core package for pagination", | ||
"author": "isaurssaurav <saurssaurav33@gmail.com>", | ||
"type": "module", | ||
"homepage": "", | ||
"license": "ISC", | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./lib/index.js", | ||
"require": "./lib/index.cjs" | ||
}, | ||
"./style.css": "./lib/index.css" | ||
}, | ||
"typings": "./lib/index.d.ts", | ||
"directories": { | ||
@@ -18,6 +25,14 @@ "lib": "lib", | ||
"scripts": { | ||
"build": "tsc", | ||
"test": "node ./__tests__/core.test.js" | ||
"build": "vite build && tsc", | ||
"test": "jest" | ||
}, | ||
"gitHead": "925cad921d0306490fe63bd1f724240ec419a5bc" | ||
"gitHead": "53a524045f2c8099955bbc015742fc47763f93c9", | ||
"devDependencies": { | ||
"@types/jest": "^29.5.5", | ||
"jest": "^29.7.0", | ||
"sass": "^1.69.0", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^5.2.2", | ||
"vite": "^4.4.11" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2451
6
27
Yes
6