{"size": 206, "ext": "js", "max_stars_repo_path": "src/util/tss.js", "max_stars_repo_name": "josoriom/pls", "max_stars_repo_stars_event_min_datetime": "2018-11-16T16:35:21.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-17T00:33:35.000Z", "max_issues_repo_path": "src/util/tss.js", "max_issues_repo_name": "josoriom/pls", "max_issues_repo_issues_event_min_datetime": "2015-07-24T08:59:57.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-30T12:50:49.000Z", "max_forks_repo_path": "src/util/tss.js", "max_forks_repo_name": "josoriom/pls", "max_forks_repo_forks_event_min_datetime": "2017-03-14T15:21:37.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-01T18:40:43.000Z"}
{"max_stars_count": 6, "max_issues_count": 24, "max_forks_count": 10, "avg_line_length": 18.7272727273, "max_line_length": 44, "alphanum_fraction": 0.6262135922}
import { Matrix } from 'ml-matrix';

/**
 * Get total sum of square
 * @param {Array} x an array
 * @return {Number} - the sum of the squares
 */
export function tss(x) {
  return Matrix.mul(x, x).sum();
}
