How to use the child_process.spawn.bind function in child_process

To help you get started, we’ve selected a few child_process examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github parshap / node-ffmetadata / index.js View on Github external
/* jshint node:true */
"use strict";

var spawn = require("child_process").spawn,
	ffmpeg = spawn.bind(null, process.env.FFMPEG_PATH || "ffmpeg"),
	fs = require("fs"),
	through = require("through"),
	concat = require("concat-stream");

module.exports.read = function(src, options, callback) {
	if (typeof options === "function") {
		callback = options;
		options = {};
	}

	var args = getReadArgs(src, options);

	if (options.dryRun) {
		return args;
	}
github bfrgoncalves / Online-PhyloViZ / node_modules / cron / lib / cron.js View on Github external
function command2function(cmd) {
	switch (typeof cmd) {
		case 'string':
			var args = cmd.split(' ');
			var command = args.shift();

			cmd = spawn.bind(undefined, command, args);
			break;
		case 'object':
			var command = cmd && cmd.command;
			if (command) {
				var args = cmd.args;
				var options = cmd.options;

				cmd = spawn.bind(undefined, command, args, options);
			}
			break;
	}

	return cmd
}
github bfrgoncalves / Online-PhyloViZ / node_modules / cron / lib / cron.js View on Github external
function command2function(cmd) {
	switch (typeof cmd) {
		case 'string':
			var args = cmd.split(' ');
			var command = args.shift();

			cmd = spawn.bind(undefined, command, args);
			break;
		case 'object':
			var command = cmd && cmd.command;
			if (command) {
				var args = cmd.args;
				var options = cmd.options;

				cmd = spawn.bind(undefined, command, args, options);
			}
			break;
	}

	return cmd
}
github twitch-irc / twitch-irc / node_modules / cron / lib / cron.js View on Github external
function command2function(cmd)
{
  switch(typeof cmd)
  {
    case 'string':
    {
      var args = cmd.split(' ');
      var command = args.shift();

      cmd = spawn.bind(undefined, command, args);
    }
    break;

    case 'object':
    {
      var command = cmd && cmd.command;
      if(command)
      {
        var args = cmd.args;
        var options = cmd.options;

        cmd = spawn.bind(undefined, command, args, options);
      }
    }
    break;
  }
github twitch-irc / twitch-irc / node_modules / cron / lib / cron.js View on Github external
var args = cmd.split(' ');
      var command = args.shift();

      cmd = spawn.bind(undefined, command, args);
    }
    break;

    case 'object':
    {
      var command = cmd && cmd.command;
      if(command)
      {
        var args = cmd.args;
        var options = cmd.options;

        cmd = spawn.bind(undefined, command, args, options);
      }
    }
    break;
  }

  return cmd
}

child_process

This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.

ISC
Latest version published 8 years ago

Package Health Score

65 / 100
Full package analysis