1.0.7 • Published 7 years ago

cli-apply v1.0.7

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

CLI Apply

Travis Build Codecov npm downloads

Description

CLI Apply is a simple way to create node applications that can be executed and interfaced with using the command line.

Usage

npm install cli-apply

const cliApply = require('cli-apply')

cliApply({
  one: function (x, y) {
    return [x, y]
  },
  two: function (x, y) {
    return [y, x]
  }
}, {})
.then(function (result) {
  console.log(result)
})
  • When the file is executed, a terminal prompt will ask you which function you would like to execute.

    images/usage1.png

  • Once selected an array can be supplied which will be the parameters of the function.

    images/usage2.png

  • The specified function will be executed with the given parameters and will return the result.

    images/usage3.png

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago