From 63c6b029e27d5e992205ebb0242f016b2b0321a2 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 7 Mar 2020 21:00:44 -0500 Subject: [PATCH] Remove reduceBySum() to Math. --- src/Math.ts | 2 ++ src/fed2019/Form1040.ts | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Math.ts b/src/Math.ts index 5319278..613e5eb 100644 --- a/src/Math.ts +++ b/src/Math.ts @@ -1,3 +1,5 @@ export function clampToZero(value: number): number { return value < 0 ? 0 : value; } + +export const reduceBySum = (list: number[]) => list.reduce((acc, curr) => acc + curr, 0); diff --git a/src/fed2019/Form1040.ts b/src/fed2019/Form1040.ts index 16eb259..2aed67f 100644 --- a/src/fed2019/Form1040.ts +++ b/src/fed2019/Form1040.ts @@ -2,6 +2,7 @@ import Form, { FormClass } from '../Form'; import TaxReturn from '../TaxReturn'; import { Line, AccumulatorLine, ComputedLine, ReferenceLine, sumLineOfForms } from '../Line'; import { UnsupportedFeatureError } from '../Errors'; +import { reduceBySum } from '../Math'; import Form8606 from './Form8606'; import Form8959 from './Form8959'; @@ -21,8 +22,6 @@ export interface Form1040Input { filingStatus: FilingStatus; }; -const reduceBySum = (list: number[]) => list.reduce((acc, curr) => acc + curr, 0); - export default class Form1040 extends Form { readonly name = '1040'; -- 2.43.5