Skip to main content

Utility Functions

FunctionPlatformInputOutputDescription
toArrayallstd::vector objectarrayConverts a std::vector object into a JavaScript array
toVectorallstd::vector class, arraystd::vector objectConverts 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);

info

Browser Functions: You can access the browser functions from this link.
Node.js Functions: You can access the Node.js functions from this link.
React Native Functions: You can access the React Native functions from this link.