| 35 | Persistent<v8::FunctionTemplate> encodeUCS2_persistent; |
| 36 | |
| 37 | NAN_MODULE_INIT(Init) { |
| 38 | v8::Local<v8::FunctionTemplate> returnUtf8String = |
| 39 | New<v8::FunctionTemplate>(ReturnUtf8String); |
| 40 | |
| 41 | returnUtf8String_persistent.Reset(returnUtf8String); |
| 42 | |
| 43 | Set(target |
| 44 | , New("returnUtf8String").ToLocalChecked() |
| 45 | , GetFunction(returnUtf8String).ToLocalChecked() |
| 46 | ).FromJust(); |
| 47 | |
| 48 | v8::Local<v8::FunctionTemplate> heapString = |
| 49 | New<v8::FunctionTemplate>(HeapString); |
| 50 | |
| 51 | heapString_persistent.Reset(heapString); |
| 52 | |
| 53 | Set(target |
| 54 | , New("heapString").ToLocalChecked() |
| 55 | , GetFunction(heapString).ToLocalChecked() |
| 56 | ).FromJust(); |
| 57 | |
| 58 | v8::Local<v8::FunctionTemplate> encodeHex = |
| 59 | New<v8::FunctionTemplate>(EncodeHex); |
| 60 | |
| 61 | encodeHex_persistent.Reset(encodeHex); |
| 62 | |
| 63 | Set(target |
| 64 | , New("encodeHex").ToLocalChecked() |
| 65 | , GetFunction(encodeHex).ToLocalChecked() |
| 66 | ).FromJust(); |
| 67 | |
| 68 | v8::Local<v8::FunctionTemplate> encodeUCS2 = |
| 69 | New<v8::FunctionTemplate>(EncodeUCS2); |
| 70 | |
| 71 | encodeUCS2_persistent.Reset(encodeUCS2); |
| 72 | |
| 73 | Set(target |
| 74 | , New("encodeUCS2").ToLocalChecked() |
| 75 | , GetFunction(encodeUCS2).ToLocalChecked() |
| 76 | ).FromJust(); |
| 77 | } |
| 78 | |
| 79 | NODE_MODULE(strings, Init) |
nothing calls this directly
no test coverage detected