Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/libs/isInt.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// @ts-ignore allowing typedoc to build
import assertString from '../utils/assertString.ts';

const int = /^\d+$/;

export const isInt = (str: string) => {
assertString(str);
return int.test(str);
}
4 changes: 3 additions & 1 deletion src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ export * from './libs/isByteLength.ts';
// @ts-ignore allowing typedoc to build
export * from './libs/isCreditCard.ts';
// @ts-ignore allowing typedoc to build
export * from './libs/isFloat.ts';
export * from './libs/isFloat.ts';
//@ts-ignore allowing typedoc to build
export * from './libs/isInt';