@geonet/array-deep-average
v1.0.3
Published
Average all values in an array recursively
Downloads
3
Readme
@geonet/array-deep-average
Average all values in an array recursively
Usage
const arrayDeepAverage = require('@geonet/array-deep-average');
arrayDeepAverage( 1, 2, 3 ) // -> 2
arrayDeepAverage( [ 1, 2, 3 ] ) // -> 2
arrayDeepAverage( [ 1, [ 2, [ 3 ] ] ] ) // -> 2