Const
true in a development build (the default), false when a bundler has defined __FOUR_DEV__ as false.
true
false
__FOUR_DEV__
Use it as a plain if condition around author-facing work:
if
import { DEV, devWarn } from "@fourjs/core";if (DEV && !Number.isFinite(mass)) { devWarn(`mass must be finite; got ${String(mass)} (§85).`);} Copy
import { DEV, devWarn } from "@fourjs/core";if (DEV && !Number.isFinite(mass)) { devWarn(`mass must be finite; got ${String(mass)} (§85).`);}
Read the module header before gating anything: the flag must never change a number the simulation computes (§33).
truein a development build (the default),falsewhen a bundler has defined__FOUR_DEV__asfalse.Use it as a plain
ifcondition around author-facing work:Read the module header before gating anything: the flag must never change a number the simulation computes (§33).