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

whereis

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

whereis - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

test.js

9

index.js

@@ -1,7 +0,9 @@

var exec = require('child_process').exec;
var cp = require('child_process');
module.exports = function whereis(name, cb) {
exec('which ' + name, function(error, stdout, stderr) {
cp.exec('which ' + name, function(error, stdout, stderr) {
stdout = stdout.split('\n')[0];
if (error || stderr || stdout === '' || stdout.charAt(0) !== '/') {
exec('whereis ' + name, function(error, stdout, stderr) {
stdout = stdout.split('\n')[0];
cp.exec('whereis ' + name, function(error, stdout, stderr) {
if (error || stderr || stdout === '' || stdout.indexOf('/') === -1) {

@@ -19,1 +21,2 @@ return cb(new Error('Could not find ' + name + ' or system not supported'));

{
"name": "whereis",
"version": "0.0.1",
"version": "0.0.2",
"author": "Vincent Voyer vincent.voyer@gmail.com",

@@ -14,3 +14,9 @@ "description": "Which/Whereis easy helper, find if a program exists",

],
"repository": "git://github.com/vvo/node-whereis.git"
"repository": "git://github.com/vvo/node-whereis.git",
"devDependencies": {
"tap": "~0.3.0"
},
"scripts": {
"test": "node test"
}
}
node-whereis
============
Simply get the first path to a bin on any system
Simply get the first path to a bin on any system
```js
var whereis = require('whereis');
whereis('wget', function(err, path) {
console.log(path);
});
// /usr/bin/wget
```
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