Utility Functions
Function | Platform | Input | Output | Description |
---|---|---|---|---|
toArray | all | std::vector object | array | Converts a std::vector object into a JavaScript array |
toVector | all | std::vector class, array | std::vector object | Converts a JavaScript array into a std::vector object |
Examples
const myArray = ['a', 'b'];
const nativeArray = Module.toVector(Module.VectorString, myArray);
const jsArray = Module.toArray(nativeArray);