get-matrix-sums

1.1.0 • Public • Published

get-matrix-sums

Build Status

Installation

npm install get-matrix-sums --save

Syntax

getMatrixSums([
  [1, 1, 1],
  [1, 1, 1],
  [1, 1, 1]
]);
 
// [
//   [3,3,3] // Horizontal sums
//   [3,3,3] // Vertical sums
// ]
 
getMatrixSums([
  [1, 1, 1]
]);
 
// [
//   [3]     // Horizontal sums
//   [1,1,1] // Vertical sums
// ]

Tests

npm test

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Release History

  • 1.1.0 Support for n !== m matrices
  • 1.0.0 First release

Readme

Keywords

none

Package Sidebar

Install

npm i get-matrix-sums

Weekly Downloads

1

Version

1.1.0

License

ISC

Last publish

Collaborators

  • janjarfalk