@geonet/array-deep-sum
v1.0.3
Published
Generic array deep sum
Downloads
6
Readme
@geonet/array-deep-sum
Add up all values in an array recursively
Usage
const arraySum = require('@geonet/array-deep-sum');
arraySum( 1, 2, 3 ) // -> 6
arraySum( [ 1, 2, 3 ] ) // -> 6
arraySum( [ 1, [ 2, [ 3 ] ] ] ) // -> 6