Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-watcher

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-watcher - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

8

index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc