@perl/qx

1.1.0 • Public • Published

@perl/qx

Run a command and capture its return status.

const qx = require('@perl/qx')

// capture the output from `ls -l`
const output = await qx`ls -l`

// with promises
qx`ls -l`.then(output => console.log(output))

// also available in synchronous version
const output = qx.sync`ls -l`

// or as an ordinary function (handy because it avoids needing quoting)
const output = await qx('ls', '-l')
qx('ls', '-l').then(output => console.log(output))
const output = qx.sync('ls', '-l')

Origins

This is intended to provide the same functionality as the Perl qx syntax.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    7
  • 1.0.3
    0
  • 1.0.2
    23
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @perl/qx

Weekly Downloads

30

Version

1.1.0

License

ISC

Unpacked Size

3.57 kB

Total Files

4

Last publish

Collaborators

  • iarna