From c60c34deb9ea5f233cc31496a1fce39975301ce1 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Sat, 14 Dec 2019 10:33:14 -0800 Subject: [PATCH] benchmark: add templated version of Function --- benchmark/function_args.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/benchmark/function_args.cc b/benchmark/function_args.cc index 15c6de6fc..7dcc7c781 100644 --- a/benchmark/function_args.cc +++ b/benchmark/function_args.cc @@ -139,6 +139,14 @@ static Napi::Object Init(Napi::Env env, Napi::Object exports) { cplusplus["fourArgFunction"] = Napi::Function::New(env, FourArgFunction); exports["cplusplus"] = cplusplus; + Napi::Object templated = Napi::Object::New(env); + templated["noArgFunction"] = Napi::Function::New(env); + templated["oneArgFunction"] = Napi::Function::New(env); + templated["twoArgFunction"] = Napi::Function::New(env); + templated["threeArgFunction"] = Napi::Function::New(env); + templated["fourArgFunction"] = Napi::Function::New(env); + exports["templated"] = templated; + return exports; }