1.0.0 • Published 3 years ago

reno-sow-calculation v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

RENO-SOW-CALCULATION

Reno-Sow-Calculation is a Javascript library for calculating Zillow Renovation Line Item Cost

Installation

Use the package manager npme to install Reno-Sow-Calculation.

yarn add reno-sow-calculation

Usage

import { calculateLineItemCost } from "reno-sow-calculation";

const {
      totalMaterialCost,
      totalFlatCost,
      totalLaborCost,
      totalMiscCost,
      totalCost,
    } = calculateLineItemCost({
      isDemoExisting: false,
      lineItemId: 1,
      costInfo: {
        costPerUnit: 10.11,
        numberUnits: 2,
        miscCostPerUnit: 1.25,
        demolitionCostPerUnit:
          0,
        installationLaborCostPerUnit:
          0,
      },

      materialCosts: [],
      type: "Material None",
    });
import { checkAndRecalculateNewLaborCost } from "reno-sow-calculation";

const {
      newTotalCost,
      recalculatedLaborCostAdjustment,
      isValidNewLaborCost,
    } = checkAndRecalculateNewLaborCost(11, 20, 3, 10);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

1.0.1

3 years ago

1.0.0

3 years ago