🚀 Socket Launch Week 🚀 Day 3: Socket Acquires Coana.Learn More
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

behind

Figure out if a file is behind its dependencies a la make

0.1.0
latest
Version published
Weekly downloads
4
33.33%
Maintainers
1
Weekly downloads
 
Created

Behind

Does mtime checking of a dependent file vs a bunch of dependencies. Basically the same thing a make task does before running.

Example


var behind = require('behind');

behind('./dependent.out', [ './dependency.in' ], function (err, deps) {
  if (err) throw err;

  //
  // If there are no deps, `deps` is null.
  // I'm open to changing this API.
  //
  if (deps) {
    console.log('stale dependencies:', deps);
  }
});

Alternately:


var behind = require('behind').sync;

var deps = behind('./dependent.out', [ './dependency.in' ]);

if (deps) {
  console.log('stale dependencies:', deps);
}

That's pretty much it.

License

MIT

FAQs

Package last updated on 25 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts