classafBson::Code

sys::Obj
  afBson::Code

@Serializable

(BSON Type) - Wraps a JavaScript function and its arguments.

Code is not const because the scope document could contain Binary data.

code

Source

Str code

JavaScript code.

makeCode

Source

new makeCode(Str code, Str:Obj? scope := [Str:Obj?][:])

Creates a BSON Code instance.

scope

Source

Str:Obj? scope

A mapping from identifiers to values, representing the scope in which the code should be evaluated. Essentially a map of method parameters and their arguments.