UNPKG

@awayfl/avm2

Version:

Virtual machine for executing AS3 code

14 lines (12 loc) 432 B
import { release } from '@awayfl/swf-loader'; import { assert } from '@awayjs/graphics'; import { isValidASValue } from './initializeAXBasePrototype'; export function checkValue(value: any) { if (!release) { if (!isValidASValue(value)) { // Stringifying the value is potentially costly, so only do it if necessary, // even in debug mode. assert(false, 'Value: ' + value + ' is not allowed to flow into AS3.'); } } }