in a easy way. A few of the things that this library is capable of are operations like,
rounding a decimal upto 2 decimal places, or trying to find the
Read on to find out more features about this library.
You can download this library as an npm module by running the following command
npm install simplemathjs
Once downloaded, you can include in your html file like so
That's it, you can now use this library by referring to the
MJ// 3.14MJ// 
There functionalities are segrated by primarily three sections
- Array Functionalities
- Numberic Functionalities
- String Functionalities
List of Functions that you can operate on Arrays
Given an array of arrays, it will flatten hierarchies of arrays and return a single array.
MJ// [1, 2, 3, 4, 5, 6, 7, 8, 9]
Given a list of items in an array, it will returns an array of elements containing all the elements occurring only once, i.e. removes duplicates.
MJ// [1, "b", false, true, undefined]
Given two sets of arrays, returns the set of unique elements which are present in both
MJ// [1, 2]
Given two set of arrays, returns the set of elements present in the left, but not in the right.
MJ// MJ//  since there are no elements on the left which are NOT present on the right
Given a set of arrays as arguments, returns a single array containing all the elements present in every argument, including duplicates.
NOTE: the arguments for the function always need to be an array
MJ// [1, 5, 5, 2, [2, false], "abc", true, ['another', 5.15], undefined, null]MJ// [1, 2]
Given an array of numbers,
MJ// 68.16666666666667MJ// NaN