1.0.5 • Published 3 years ago

spawn-inline v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Spawn inline

Simple wrapper for spawn() function to make it work with await and line-command without need of array of attributes.

Usage sample:

const spawnInline = require('spawn-inline');
await spawnInline('git status', {cwd: 'repo-dir'}, (text, err) => console.log(text));
// or
await spawnInline('git status', 'repo-dir');

Function attributes

async function (command, options, callback)

Callback

function (out, err)

  • text - text output of called command
  • err - boolean, indicates if error occured

Return value

Spawn-inline return an array filled with output lines.

License

MIT

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago