JSPM

npm-shri-stub

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q13761F
  • License ISC

NPM module stub for SHRI lesson presentation

Package Exports

  • npm-shri-stub

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (npm-shri-stub) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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