🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

build-shell-script

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-shell-script

Build shell aliases and functions

1.0.2
latest
Version published
Weekly downloads
2
-84.62%
Maintainers
1
Weekly downloads
 
Created

build-shell-script

NPM version Build Status XO code style

Build shell aliases and functions from Node

Install

npm install --save build-shell-script

Usage

const buildShellScript = require('build-shell-script');

buildShellScript.alias('gi', 'git init');
//=> 'alias gi="git init"

buildShellScript.fn('gi', 'git init');
//=> function gi() {
//     git init
//   }

buildShellScript.fn('g', [
  'git add -A',
  'git commit',
  'git push'
]);
//=> function g() {
//     git add -A
//     git commit
//     git push
//   }

API

buildShellScript.alias(prefix, suffix)

Arguments

NameDescriptionTypeDefault
prefixLeft side of shell aliasstringNone (required)
suffixRight side of shell aliasstringNone (required)

Returns

Type: string

buildShellScript.fn(prefix, suffix)

Arguments

NameDescriptionTypeDefault
prefixLeft side of shell functionstringNone (required)
suffixRight side of shell functionstring or arrayNone (required)

Returns

Type: string

License

MIT © Dawson Botsford

Keywords

FAQs

Package last updated on 01 Feb 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