-
06:53
(UTC +01:00) - http://www.honzagal.cz
- @honzagal.bsky.social
Pinned Loading
-
Pagination generator
Pagination generator 1// The code is based on https://gist.github.com/kottenator/9d936eb3e4e3c3e02598#gistcomment-3238804
23type PageItem = number | "...";
45export const getRange = (start: number, end: number): PageItem[] => {
-
Typescript To Convert Bytes To MB, K...
Typescript To Convert Bytes To MB, KB, Etc 1export function convertBytes(bytes: number, options: { useBinaryUnits?: boolean; decimals?: number } = {}): string {
2const { useBinaryUnits = false, decimals = 2 } = options;
34if (decimals < 0) {
5throw new Error(`Invalid decimals ${decimals}`);
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.