diff --git a/packages/node-krl-stdlib/src/index.js b/packages/node-krl-stdlib/src/index.js index 9b0d42b31..cb1b013b8 100644 --- a/packages/node-krl-stdlib/src/index.js +++ b/packages/node-krl-stdlib/src/index.js @@ -101,6 +101,7 @@ stdlib.isnull = function(val){ stdlib.klog = function(val, message){ console.log("[KLOG]", message, val); + return val; }; stdlib["typeof"] = function(val){ diff --git a/packages/node-krl-stdlib/src/tests.js b/packages/node-krl-stdlib/src/tests.js index 7cb89856b..482334c83 100644 --- a/packages/node-krl-stdlib/src/tests.js +++ b/packages/node-krl-stdlib/src/tests.js @@ -56,6 +56,7 @@ test("general operators", function(t){ t.equals(stdlib.isnull({}), false); t.ok(_.isFunction(stdlib.klog), "just checking that it's there"); + t.equals(stdlib.klog(42,"log message for"),42); t.equals(stdlib["typeof"](""), "String"); t.equals(stdlib["typeof"](0), "Number");