Skip to content

Commit

Permalink
Merge pull request #1 from Picolab/fix-operator-klog
Browse files Browse the repository at this point in the history
ensure klog operator returns its object
  • Loading branch information
farskipper committed Sep 25, 2017
1 parent a8eac19 commit fbd7529
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/node-krl-stdlib/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ stdlib.isnull = function(val){

stdlib.klog = function(val, message){
console.log("[KLOG]", message, val);
return val;
};

stdlib["typeof"] = function(val){
Expand Down
1 change: 1 addition & 0 deletions packages/node-krl-stdlib/src/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit fbd7529

Please sign in to comment.