Node Js Class inheritance

[code language=”javascript”] // — begin of definition of Watcher class —– function Watcher(watchDir, processedDir) { this.watchDir = watchDir; this.processedDir = processedDir; } var events = require(‘events’), util = require(‘util’); util.inherits(Watcher, events.EventEmitter); var fs = require(‘fs’), watchDir = ‘./watch’, processedDir = ‘./done’; // The `watch` method cycles through the directory, procesing any files found. // Extend … Continue reading Node Js Class inheritance