#ifndef JSVALUEHELPER_H #define JSVALUEHELPER_H #include #include #include "v8.h" #define NewV8String(name) \ v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), name, \ v8::NewStringType::kNormal) \ .ToLocalChecked() std::string JS2String(v8::Local object); double JS2Number(v8::Local value); bool JS2Bool(v8::Local value); v8::Local String2JS(std::string string); v8::Local Variant2JS(QVariant variant); #endif // JSVALUEHELPER_H