From a69f18d04a9c9cd2fdb85c490ef8feb6af4eefac Mon Sep 17 00:00:00 2001 From: Joel Kuzmarski Date: Thu, 27 Jul 2017 06:21:52 -0500 Subject: [PATCH] Hotfix for module named like "is-function" Without this, "can-util/js/is-function/is-function" stops short at "can-util/js/is-function" --- lib/typer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/typer.js b/lib/typer.js index b35ed67..3898b83 100644 --- a/lib/typer.js +++ b/lib/typer.js @@ -157,7 +157,7 @@ var tree = require("./tree"); }; module.exports = { - tokens: ["\\?", "\\!", "function", "\\.\\.\\.", ",", "\\:", "\\|", "="], + tokens: ["\\?", "\\!", "(?:[^\\-]|^)function", "\\.\\.\\.", ",", "\\:", "\\|", "="], process: process, type: function(str){ return process(this.tree(str), {});