simple-watcher
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -20,4 +20,6 @@ 'use strict' | ||
if (tolerance) { | ||
let now = Date.now() | ||
if (filePath === last.filePath && now - last.timestamp < tolerance) { | ||
// Compare last modified time. | ||
let stat = fs.statSync(filePath) | ||
let timestamp = (new Date(stat.mtime)).getTime() | ||
if (filePath === last.filePath && timestamp - last.timestamp < tolerance) { | ||
return | ||
@@ -27,3 +29,3 @@ } | ||
last.filePath = filePath | ||
last.timestamp = now | ||
last.timestamp = timestamp | ||
} | ||
@@ -30,0 +32,0 @@ |
{ | ||
"name": "simple-watcher", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "\"A simple recursive directory watcher.\"", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
6054
80