UNPKG

godprotocol

Version:

A distributed computing environment for Web 4.0 — integrating AI, decentralisation, and virtual computation.

10 lines (7 loc) 242 B
const assert = async(args, {vm})=>{ let {predicate} = args; let yes = !!await predicate.literal() if (yes) return; return await vm.throw_error({type: 'AssertionError', message: 'Test case failed!'}) } export default assert