npm-shri-stub

0.0.2 • Public • Published

npm-shri-stub

Repository which can be used as stub for npm module. (Presentation Module)

NPM version Coveralls branch Travis David

Usage

Install npm-shri-stub package as usual:

npm install --save npm-shri-stub

Add npm-shri-stub calls into you code:

const shri = require('npm-shri-stub');

const add = shri.add(1, 2);

const subtract = shri.subtract(2, 1);

const multiply = shri.multiply(2, 3);

const divide = shri.divide(2, 1);

API

add

description: calculates sum of two numbers example:

const add = shri.add(1, 2); //add = 3

subtract

description: calculates diff between two numbers example:

const subtract = shri.subtract(2, 1); //subtract = 1

multiply

description: multiply two numbers example:

const multiply = shri.multiply(2, 3); //multiply = 6

divide

description: divide given numbers example:

const divide = shri.divide(2, 1); //divide = 1 

CLI

This tool also can be used from command line interface (CLI)

Examples:

Sum of two numbers:

node bin/shri add 2 3

Difference between two numbers:

node bin/shri subtract 2 3

Multiply two numbers:

node bin/shri multiply 2 3

Divide two numbers:

node bin/shri divide 4 2

Testing

Run tests mocha:

npm run mocha

Run tests with istanbul coverage calculation:

npm test

Run codestyle verification eslint

npm run lint

Maintainer @tormozz48 Please send your questions and proposals to: tormozz48@gmail.com

Readme

Keywords

Package Sidebar

Install

npm i npm-shri-stub

Weekly Downloads

0

Version

0.0.2

License

ISC

Last publish

Collaborators

  • tormozz48