Comparing version 1.5.0 to 1.5.1
// Generated by CoffeeScript 1.6.3 | ||
(function() { | ||
var Finder, fs, moment, _path; | ||
var Finder, compare, fs, moment, _path; | ||
@@ -11,2 +11,4 @@ fs = require('fs'); | ||
compare = require('operator-compare'); | ||
Finder = (function() { | ||
@@ -55,3 +57,3 @@ Finder.ASTERISK_PATTERN = '<[0-9a-zA-Z/.-_ ]+>'; | ||
this.filter(function(stat) { | ||
return Finder.compare(stat.size, operation, value); | ||
return compare(stat.size, operation, value); | ||
}); | ||
@@ -74,3 +76,3 @@ return this; | ||
} | ||
return Finder.compare((new Date(stat.mtime)).getTime(), operation, date.valueOf()); | ||
return compare((new Date(stat.mtime)).getTime(), operation, date.valueOf()); | ||
}); | ||
@@ -220,24 +222,2 @@ return this; | ||
Finder.compare = function(l, operator, r) { | ||
switch (operator) { | ||
case '>': | ||
return l > r; | ||
case '>=': | ||
return l >= r; | ||
case '<': | ||
return l < r; | ||
case '<=': | ||
return l <= r; | ||
case '=': | ||
case '==': | ||
return l === r; | ||
case '!': | ||
case '!=': | ||
case '<>': | ||
return l !== r; | ||
default: | ||
throw new Error('Unknown operator ' + operator + '.', '^.'); | ||
} | ||
}; | ||
Finder.normalizePattern = function(pattern) { | ||
@@ -244,0 +224,0 @@ var i, part, parts, partsResult, replacement, _i, _len; |
{ | ||
"name": "fs-finder", | ||
"description": "File system recursive finder", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"author": { | ||
@@ -26,3 +26,4 @@ "name": "David Kudera", | ||
"dependencies": { | ||
"moment": "2.1.0" | ||
"moment": "2.1.0", | ||
"operator-compare": "latest" | ||
}, | ||
@@ -29,0 +30,0 @@ "devDependencies": { |
@@ -140,2 +140,5 @@ # fs-finder | ||
* 1.5.1 | ||
+ Compare function replaced with [operation-compare](https://npmjs.org/package/operator-compare) | ||
* 1.5.0 | ||
@@ -142,0 +145,0 @@ + Added changelog |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
173
24486
2
383
+ Addedoperator-compare@latest
+ Addedoperator-compare@1.0.3(transitive)