Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cli-apply

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-apply

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

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 16 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc