helper-fns
Advanced tools
Comparing version 2.5.2 to 2.5.6
@@ -5,2 +5,27 @@ declare const assert: (condition: boolean, message: string) => asserts condition; | ||
declare const isDef: <T = any>(val?: T | undefined) => val is T; | ||
declare const isBoolean: (val: any) => val is boolean; | ||
declare const isFunction: <T extends Function>(val: any) => val is T; | ||
declare const isNumber: (val: any) => val is number; | ||
declare const isString: (val: unknown) => val is string; | ||
declare const isObject: (val: any) => val is object; | ||
declare class PaginationMeta { | ||
itemCount: number; | ||
totalItems: number; | ||
itemsPerPage: number; | ||
totalPages: number; | ||
currentPage: number; | ||
} | ||
declare class PaginatedDto<T> { | ||
meta: PaginationMeta; | ||
items: T[]; | ||
} | ||
interface IPageOptions<T> { | ||
limit: number; | ||
page: number; | ||
results: T[]; | ||
pages: number; | ||
total: number; | ||
} | ||
interface ISlugifyOptions { | ||
@@ -465,10 +490,4 @@ lowercase?: boolean; | ||
declare const template: (str: any, mix: Record<string, any>) => any; | ||
declare function paginate<T>({ limit, total, results, pages, page }: IPageOptions<T>): PaginatedDto<T>; | ||
declare const isDef: <T = any>(val?: T | undefined) => val is T; | ||
declare const isBoolean: (val: any) => val is boolean; | ||
declare const isFunction: <T extends Function>(val: any) => val is T; | ||
declare const isNumber: (val: any) => val is number; | ||
declare const isString: (val: unknown) => val is string; | ||
declare const isObject: (val: any) => val is object; | ||
export { assert, autoParseValues, capitalize, capitalizeEveryWord, clearUndefined, clone, common, debounce, decrypt, difference, dropRight, encrypt, ensurePrefix, enumToString, fixedDecimal, flattenDeep, formatDuration, generateRandomString, groupBy, invertObj, isBoolean, isDate, isDef, isEmpty, isFunction, isNotEmpty, isNumber, isObject, isString, lowerFirst, noop, normalizeEmail, objectArrayToArray, omit, orderBy, orderedToken, pick, pipes, pluck, randomNumber, randomString, randomToken, readFile, removeEmpty, renameKeys, resolverArgs, shuffle, slash, slugify, strAfter, strBefore, stringifyQueryParams, sumOfAnArray, template, throttle, timeTaken, toString, unescapeHTML, union, unique }; | ||
export { IPageOptions, PaginatedDto, PaginationMeta, assert, autoParseValues, capitalize, capitalizeEveryWord, clearUndefined, clone, common, debounce, decrypt, difference, dropRight, encrypt, ensurePrefix, enumToString, fixedDecimal, flattenDeep, formatDuration, generateRandomString, groupBy, invertObj, isBoolean, isDate, isDef, isEmpty, isFunction, isNotEmpty, isNumber, isObject, isString, lowerFirst, noop, normalizeEmail, objectArrayToArray, omit, orderBy, orderedToken, paginate, pick, pipes, pluck, randomNumber, randomString, randomToken, readFile, removeEmpty, renameKeys, resolverArgs, shuffle, slash, slugify, strAfter, strBefore, stringifyQueryParams, sumOfAnArray, template, throttle, timeTaken, toString, unescapeHTML, union, unique }; |
{ | ||
"name": "helper-fns", | ||
"type": "module", | ||
"version": "2.5.2", | ||
"version": "2.5.6", | ||
"packageManager": "pnpm@7.2.1", | ||
@@ -51,13 +51,13 @@ "description": "Some common utilities functions for everyday backend usage with zero dependencies", | ||
"@antfu/eslint-config": "^0.25.2", | ||
"@antfu/ni": "^0.16.3", | ||
"@types/node": "^18.0.3", | ||
"@antfu/ni": "^0.17.2", | ||
"@types/node": "^18.0.6", | ||
"bumpp": "^8.2.1", | ||
"eslint": "^8.19.0", | ||
"eslint": "^8.20.0", | ||
"esno": "^0.16.3", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.7.4", | ||
"unbuild": "^0.7.4", | ||
"vite": "^2.9.14", | ||
"vitest": "^0.18.0" | ||
"unbuild": "^0.7.6", | ||
"vite": "^3.0.2", | ||
"vitest": "^0.18.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
41775
1215