said

0.2.0 • Public • Published

said

Run CLI commands and return output as string

install

npm install said

usage

const said = require("said")

capturing command output

said("node -v") // "v8.3.0"
said("npm -v") // "v5.6.0"

commands in conditionals

if (said("git diff")) {
  said("git add .")
}

notes

  • Runs synchronously
  • Returns a trim string
  • Buffers or other outputs convert to string
  • Trims the output string before returning

Package Sidebar

Install

npm i said

Weekly Downloads

0

Version

0.2.0

License

CC0-1.0

Last publish

Collaborators

  • ryanve