average-array
A JavaScript Package for calculating average from an array. Also it will work for non-number array and it will ignore the non-numbers.
Features
npm
Install
npm install --save average-array
Script Tag
For Development
<script src="https://rawgit.com/Prosen-Ghosh/average-array/master/average.js"></script>
For Production
<script src="https://cdn.rawgit.com/Prosen-Ghosh/average-array/6dac0302/average.js"></script>
Usage
const avg = ; ;//=> null ;//=> 1 ;//=> 1 ;//=> 1.5 //=> 3 ; // without parameter this function will throw a type error//=> TypeError: average() expects an array parameter
Author
Prosen Ghosh prosenghosh25@gmail.com (https://bd.linkedin.com/in/prosen-ghosh-baba9aa8)
License
- MIT