Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

RobertoMachorro/summod

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

summod

A numbers addition module. The intent is to demonstrate how node modules work, and make the module available via GitHub Packages.

Installing

NPM wants to always pull from it's home repository. You have to indicate that you are fetching from a different repository based on scope, use an .npmrc file:

@robertomachorro:registry=https://npm.pkg.github.com/
registry=https://registry.npmjs.org/

Or login to GitHub Package (use an Access Token), then install the module:

npm login --registry=https://npm.pkg.github.com/ --scope=@robertomachorro
npm install @robertomachorro/summod

Installing for Debug

NPM allows local installations, these don't require the module to be pulled down from a repository.

npm help link
npm link
npm link @robertomachorro/summod

Usage

Within code:

const summod = require('@robertomachorro/summod')
const summodarr = require('@robertomachorro/summod/sumarray')

console.log('Demo', summod.sum(1, 2), summodarr.addall(0))

References