PHP 7.4.33
Preview: errors.ts Size: 498 B
/var/www/gtechmarathon2026.bitkit.dk/httpdocs/node_modules/motion-utils/src/errors.ts
import { noop } from "./noop"

export type DevMessage = (check: boolean, message: string) => void

let warning: DevMessage = noop
let invariant: DevMessage = noop

if (process.env.NODE_ENV !== "production") {
    warning = (check, message) => {
        if (!check && typeof console !== "undefined") {
            console.warn(message)
        }
    }

    invariant = (check, message) => {
        if (!check) {
            throw new Error(message)
        }
    }
}

export { warning, invariant }

Directory Contents

Dirs: 0 × Files: 3
Name Size Perms Modified Actions
498 B lrw-r--r-- 2025-07-10 12:54:56
Edit Download
48 B lrw-r--r-- 2025-07-10 12:54:56
Edit Download
42 B lrw-r--r-- 2025-07-10 12:54:56
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).