[Pkg-javascript-commits] [node-jsonstream] 37/214: case for functions in key selector arrays, fn test passes

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 1 12:58:36 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-jsonstream.

commit 8688893af811cd4fa86dc251665fe090713b916b
Author: James Halliday <mail at substack.net>
Date:   Thu Jun 14 04:03:42 2012 -0700

    case for functions in key selector arrays, fn test passes
---
 index.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/index.js b/index.js
index 646c7d5..f192591 100644
--- a/index.js
+++ b/index.js
@@ -86,6 +86,9 @@ function check (x, y) {
     return x.exec(y)
   else if ('boolean' === typeof x)
     return x
+  else if ('function' === typeof x)
+    return x(y)
+  return false
 }
 
 exports.stringify = function (op, sep, cl) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsonstream.git



More information about the Pkg-javascript-commits mailing list