Skip to content

Basic mathematical operations with Decorator design pattern for input validation

Notifications You must be signed in to change notification settings

jonasrc/basic-math-ops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic Math Operations

Package developed as part of PUC-MG software architecture graduation program

This package does the basic four mathematical operations (sum, subtraction, multiplication and division).

The math module itself relies on a vanilla JS implementation of the Decorator design pattern to make the input validation logic common to all exported functions, whilst the specific operation methods augment the common logic with their specific logic.

Installation

npm i basic-math-ops

Usage

const math = require('basic-math-ops/math')

math.sum(1, 1)
math.subtract(5, 2)
math.multiply(7, 3)
math.divide(8, 4)

Find me on Github

About

Basic mathematical operations with Decorator design pattern for input validation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published