node402 v1.0.0
==================== The following functions are available in the math_example package.
- addition Adds two numbers and returns result.
- substraction Substracts the second number from the first and returns the result.
- multiplication Multiplies two numbers and returns the result
- division Divides the first number by the second number and returns the result.
- fibonacci Applies the fibonacci sequence count times and returns the result.
/NODE PACKAGE/ /A node.js package or application is a collection of modules with a manifest that describes the package and its dependencies and can be publicly or privately published After a package is published, the node package manager (npm) can be used to install a package - in a single application or globally/
/SAMPLE NODE PACKAGE/ /Contains 3 modules: 1)call_counter - will produce a console message 2)simple_math - will contain an add and substract function 3)advanced_math - will contain multiply,divide,Fibonacci function All math function will be usable by other applications call_counter will remain private to the package /
/CREATE PACKAGE/ /* I)Create root folder for the package with following structure:
\packageName \bin main.js \lib module1.js module2.js package.json README.md
bin folder contains the entry point to your package lib folder contains the modules
*/
7 years ago