MCPcopy Create free account
hub / github.com/freecodexyz/free-code / ifNotInteger

Function ifNotInteger

src/ink/warn.ts:3–9  ·  view source on GitHub ↗
(value: number | undefined, name: string)

Source from the content-addressed store, hash-verified

1import { logForDebugging } from '../utils/debug.js'
2
3export function ifNotInteger(value: number | undefined, name: string): void {
4 if (value === undefined) return
5 if (Number.isInteger(value)) return
6 logForDebugging(`${name} should be an integer, got ${value}`, {
7 level: 'warn',
8 })
9}

Callers

nothing calls this directly

Calls 1

logForDebuggingFunction · 0.85

Tested by

no test coverage detected