Skip to content

Commit

Permalink
move compose to main file
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Apr 21, 2017
1 parent e894de1 commit f2503bb
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions lib/utils.js
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit f2503bb

Please sign in to comment.