lib/middleware.js
function(path, next) {
  var nodes = lessFiles[path].imports;

  if (!nodes || !nodes.length) {
    return next();
  }

  var pending = nodes.length;
  var changed = [];

  nodes.forEach(function(imported){
    fs.stat(imported.path, function(err, stat) {
      // error or newer mtime
      if (err || !imported.mtime || stat.mtime > imported.mtime) {
        changed.push(imported.path);
      }

      --pending || next(changed);
    });
  });
}
function(path, next) {
  var nodes = lessFiles[path].imports;

  if (!nodes || !nodes.length) {
    return next();
  }

  var pending = nodes.length;
  var changed = [];

  nodes.forEach(function(imported){
    fs.stat(imported.path, function(err, stat) {
      // error or newer mtime
      if (err || !imported.mtime || stat.mtime > imported.mtime) {
        changed.push(imported.path);
      }

      --pending || next(changed);
    });
  });
}
function ( path , next ) { var nodes = lessFiles [ path ] . imports ; if ( ! nodes || ! nodes . length ) { return next ( ) ; } var pending = nodes . length ; var changed = [ ] ; nodes . forEach ( function ( imported ) { fs . stat ( imported . path , function ( err , stat ) { // error or newer mtime if ( err || ! imported . mtime || stat . mtime > imported . mtime ) { changed . push ( imported . path ) ; } -- pending || next ( changed ) ; } ) ; } ) ; }
Check imports for changes.
Check imports for changes .