diff --git a/lib/utils.js b/lib/utils.js index a10a6e08..c1f2c1cb 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -34,22 +34,6 @@ utils.last = function(arr, n) { return arr[arr.length - (n || 1)]; }; -/** - * Compose a matcher function with the given patterns - */ - -utils.compose = function(patterns, options, matcher) { - var fns = patterns.map(function(pattern) { - return matcher(pattern, options); - }); - - return function(file) { - var len = fns.length; - while (len--) if (fns[len](file)) return true; - return false; - }; -}; - /** * Get the `Snapdragon` instance to use */ @@ -220,6 +204,7 @@ utils.stripDrive = function(fp) { */ utils.stripPrefix = function(str) { + if (!str || typeof str !== 'string') return str; if (str.charAt(0) !== '.') { return str; }