formulab 0.1.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +283 -2
- package/README.md +147 -48
- package/dist/automotive/brakingDistance.d.ts +16 -0
- package/dist/automotive/brakingDistance.d.ts.map +1 -0
- package/dist/automotive/brakingDistance.js +47 -0
- package/dist/automotive/brakingDistance.js.map +1 -0
- package/dist/automotive/gearRatio.d.ts +2 -2
- package/dist/automotive/gearRatio.d.ts.map +1 -1
- package/dist/automotive/gearRatio.js +1 -1
- package/dist/automotive/gearRatio.js.map +1 -1
- package/dist/automotive/index.d.ts +2 -1
- package/dist/automotive/index.d.ts.map +1 -1
- package/dist/automotive/index.js +1 -0
- package/dist/automotive/index.js.map +1 -1
- package/dist/automotive/types.d.ts +18 -2
- package/dist/automotive/types.d.ts.map +1 -1
- package/dist/battery/batteryPackConfig.d.ts +10 -0
- package/dist/battery/batteryPackConfig.d.ts.map +1 -0
- package/dist/battery/batteryPackConfig.js +28 -0
- package/dist/battery/batteryPackConfig.js.map +1 -0
- package/dist/battery/bmsBalancing.d.ts +11 -0
- package/dist/battery/bmsBalancing.d.ts.map +1 -0
- package/dist/battery/bmsBalancing.js +47 -0
- package/dist/battery/bmsBalancing.js.map +1 -0
- package/dist/battery/cRate.d.ts +10 -0
- package/dist/battery/cRate.d.ts.map +1 -0
- package/dist/battery/cRate.js +29 -0
- package/dist/battery/cRate.js.map +1 -0
- package/dist/battery/chargingProfile.d.ts +11 -0
- package/dist/battery/chargingProfile.d.ts.map +1 -0
- package/dist/battery/chargingProfile.js +38 -0
- package/dist/battery/chargingProfile.js.map +1 -0
- package/dist/battery/cycleLife.d.ts +11 -0
- package/dist/battery/cycleLife.d.ts.map +1 -0
- package/dist/battery/cycleLife.js +70 -0
- package/dist/battery/cycleLife.js.map +1 -0
- package/dist/battery/energyDensity.d.ts +10 -0
- package/dist/battery/energyDensity.d.ts.map +1 -0
- package/dist/battery/energyDensity.js +20 -0
- package/dist/battery/energyDensity.js.map +1 -0
- package/dist/battery/index.d.ts +12 -0
- package/dist/battery/index.d.ts.map +1 -0
- package/dist/battery/index.js +12 -0
- package/dist/battery/index.js.map +1 -0
- package/dist/battery/internalResistance.d.ts +11 -0
- package/dist/battery/internalResistance.d.ts.map +1 -0
- package/dist/battery/internalResistance.js +18 -0
- package/dist/battery/internalResistance.js.map +1 -0
- package/dist/battery/selfDischarge.d.ts +10 -0
- package/dist/battery/selfDischarge.d.ts.map +1 -0
- package/dist/battery/selfDischarge.js +17 -0
- package/dist/battery/selfDischarge.js.map +1 -0
- package/dist/battery/stateOfHealth.d.ts +11 -0
- package/dist/battery/stateOfHealth.d.ts.map +1 -0
- package/dist/battery/stateOfHealth.js +33 -0
- package/dist/battery/stateOfHealth.js.map +1 -0
- package/dist/battery/thermalRunaway.d.ts +11 -0
- package/dist/battery/thermalRunaway.d.ts.map +1 -0
- package/dist/battery/thermalRunaway.js +28 -0
- package/dist/battery/thermalRunaway.js.map +1 -0
- package/dist/battery/types.d.ts +175 -0
- package/dist/battery/types.d.ts.map +1 -0
- package/dist/battery/types.js +5 -0
- package/dist/battery/types.js.map +1 -0
- package/dist/chemical/dilution.d.ts.map +1 -1
- package/dist/chemical/dilution.js +21 -24
- package/dist/chemical/dilution.js.map +1 -1
- package/dist/chemical/heatTransfer.d.ts +16 -0
- package/dist/chemical/heatTransfer.d.ts.map +1 -0
- package/dist/chemical/heatTransfer.js +85 -0
- package/dist/chemical/heatTransfer.js.map +1 -0
- package/dist/chemical/index.d.ts +3 -1
- package/dist/chemical/index.d.ts.map +1 -1
- package/dist/chemical/index.js +2 -0
- package/dist/chemical/index.js.map +1 -1
- package/dist/chemical/injectionCycle.d.ts +3 -0
- package/dist/chemical/injectionCycle.d.ts.map +1 -1
- package/dist/chemical/injectionCycle.js +1 -4
- package/dist/chemical/injectionCycle.js.map +1 -1
- package/dist/chemical/ph.d.ts +3 -0
- package/dist/chemical/ph.d.ts.map +1 -1
- package/dist/chemical/ph.js +1 -4
- package/dist/chemical/ph.js.map +1 -1
- package/dist/chemical/pipeFlow.d.ts +17 -0
- package/dist/chemical/pipeFlow.d.ts.map +1 -0
- package/dist/chemical/pipeFlow.js +112 -0
- package/dist/chemical/pipeFlow.js.map +1 -0
- package/dist/chemical/reactor.d.ts +3 -0
- package/dist/chemical/reactor.d.ts.map +1 -1
- package/dist/chemical/reactor.js +3 -6
- package/dist/chemical/reactor.js.map +1 -1
- package/dist/chemical/shelfLife.d.ts.map +1 -1
- package/dist/chemical/shelfLife.js +1 -7
- package/dist/chemical/shelfLife.js.map +1 -1
- package/dist/chemical/types.d.ts +82 -10
- package/dist/chemical/types.d.ts.map +1 -1
- package/dist/construction/index.d.ts +2 -1
- package/dist/construction/index.d.ts.map +1 -1
- package/dist/construction/index.js +1 -0
- package/dist/construction/index.js.map +1 -1
- package/dist/construction/momentOfInertia.d.ts +17 -0
- package/dist/construction/momentOfInertia.d.ts.map +1 -0
- package/dist/construction/momentOfInertia.js +204 -0
- package/dist/construction/momentOfInertia.js.map +1 -0
- package/dist/construction/pert.d.ts.map +1 -1
- package/dist/construction/pert.js +1 -17
- package/dist/construction/pert.js.map +1 -1
- package/dist/construction/types.d.ts +50 -0
- package/dist/construction/types.d.ts.map +1 -1
- package/dist/electronics/awg.d.ts.map +1 -1
- package/dist/electronics/awg.js +1 -4
- package/dist/electronics/awg.js.map +1 -1
- package/dist/electronics/capacitor.d.ts +3 -0
- package/dist/electronics/capacitor.d.ts.map +1 -1
- package/dist/electronics/capacitor.js +1 -4
- package/dist/electronics/capacitor.js.map +1 -1
- package/dist/electronics/index.d.ts +2 -1
- package/dist/electronics/index.d.ts.map +1 -1
- package/dist/electronics/index.js +1 -0
- package/dist/electronics/index.js.map +1 -1
- package/dist/electronics/led.d.ts.map +1 -1
- package/dist/electronics/led.js +1 -4
- package/dist/electronics/led.js.map +1 -1
- package/dist/electronics/ohmsLaw.d.ts +12 -0
- package/dist/electronics/ohmsLaw.d.ts.map +1 -0
- package/dist/electronics/ohmsLaw.js +69 -0
- package/dist/electronics/ohmsLaw.js.map +1 -0
- package/dist/electronics/smt-takt.d.ts +3 -0
- package/dist/electronics/smt-takt.d.ts.map +1 -1
- package/dist/electronics/smt-takt.js +1 -4
- package/dist/electronics/smt-takt.js.map +1 -1
- package/dist/electronics/solder.d.ts +3 -0
- package/dist/electronics/solder.d.ts.map +1 -1
- package/dist/electronics/solder.js +1 -4
- package/dist/electronics/solder.js.map +1 -1
- package/dist/electronics/stencil.d.ts.map +1 -1
- package/dist/electronics/stencil.js +1 -4
- package/dist/electronics/stencil.js.map +1 -1
- package/dist/electronics/trace.d.ts.map +1 -1
- package/dist/electronics/trace.js +1 -4
- package/dist/electronics/trace.js.map +1 -1
- package/dist/electronics/types.d.ts +24 -0
- package/dist/electronics/types.d.ts.map +1 -1
- package/dist/electronics/via.d.ts.map +1 -1
- package/dist/electronics/via.js +1 -4
- package/dist/electronics/via.js.map +1 -1
- package/dist/energy/carbonFootprint.d.ts.map +1 -1
- package/dist/energy/carbonFootprint.js +2 -1
- package/dist/energy/carbonFootprint.js.map +1 -1
- package/dist/energy/index.d.ts +2 -1
- package/dist/energy/index.d.ts.map +1 -1
- package/dist/energy/index.js +1 -0
- package/dist/energy/index.js.map +1 -1
- package/dist/energy/powerCost.d.ts.map +1 -1
- package/dist/energy/powerCost.js +2 -1
- package/dist/energy/powerCost.js.map +1 -1
- package/dist/energy/solarOutput.d.ts +14 -0
- package/dist/energy/solarOutput.d.ts.map +1 -0
- package/dist/energy/solarOutput.js +54 -0
- package/dist/energy/solarOutput.js.map +1 -0
- package/dist/energy/types.d.ts +20 -0
- package/dist/energy/types.d.ts.map +1 -1
- package/dist/environmental/emissionsIntensity.d.ts +11 -0
- package/dist/environmental/emissionsIntensity.d.ts.map +1 -0
- package/dist/environmental/emissionsIntensity.js +26 -0
- package/dist/environmental/emissionsIntensity.js.map +1 -0
- package/dist/environmental/energyIntensity.d.ts +11 -0
- package/dist/environmental/energyIntensity.d.ts.map +1 -0
- package/dist/environmental/energyIntensity.js +19 -0
- package/dist/environmental/energyIntensity.js.map +1 -0
- package/dist/environmental/esgSummary.d.ts +11 -0
- package/dist/environmental/esgSummary.d.ts.map +1 -0
- package/dist/environmental/esgSummary.js +39 -0
- package/dist/environmental/esgSummary.js.map +1 -0
- package/dist/environmental/gwpCalculator.d.ts +11 -0
- package/dist/environmental/gwpCalculator.d.ts.map +1 -0
- package/dist/environmental/gwpCalculator.js +31 -0
- package/dist/environmental/gwpCalculator.js.map +1 -0
- package/dist/environmental/index.d.ts +12 -0
- package/dist/environmental/index.d.ts.map +1 -0
- package/dist/environmental/index.js +12 -0
- package/dist/environmental/index.js.map +1 -0
- package/dist/environmental/productCarbonFootprint.d.ts +11 -0
- package/dist/environmental/productCarbonFootprint.d.ts.map +1 -0
- package/dist/environmental/productCarbonFootprint.js +29 -0
- package/dist/environmental/productCarbonFootprint.js.map +1 -0
- package/dist/environmental/scope1Emissions.d.ts +11 -0
- package/dist/environmental/scope1Emissions.d.ts.map +1 -0
- package/dist/environmental/scope1Emissions.js +35 -0
- package/dist/environmental/scope1Emissions.js.map +1 -0
- package/dist/environmental/scope2Emissions.d.ts +11 -0
- package/dist/environmental/scope2Emissions.d.ts.map +1 -0
- package/dist/environmental/scope2Emissions.js +49 -0
- package/dist/environmental/scope2Emissions.js.map +1 -0
- package/dist/environmental/scope3Emissions.d.ts +11 -0
- package/dist/environmental/scope3Emissions.d.ts.map +1 -0
- package/dist/environmental/scope3Emissions.js +36 -0
- package/dist/environmental/scope3Emissions.js.map +1 -0
- package/dist/environmental/types.d.ts +165 -0
- package/dist/environmental/types.d.ts.map +1 -0
- package/dist/environmental/types.js +5 -0
- package/dist/environmental/types.js.map +1 -0
- package/dist/environmental/vocEmissions.d.ts +11 -0
- package/dist/environmental/vocEmissions.d.ts.map +1 -0
- package/dist/environmental/vocEmissions.js +23 -0
- package/dist/environmental/vocEmissions.js.map +1 -0
- package/dist/environmental/waterFootprint.d.ts +11 -0
- package/dist/environmental/waterFootprint.d.ts.map +1 -0
- package/dist/environmental/waterFootprint.js +21 -0
- package/dist/environmental/waterFootprint.js.map +1 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/logistics/cbm.d.ts +7 -2
- package/dist/logistics/cbm.d.ts.map +1 -1
- package/dist/logistics/cbm.js +7 -2
- package/dist/logistics/cbm.js.map +1 -1
- package/dist/logistics/eoq.d.ts.map +1 -1
- package/dist/logistics/eoq.js +11 -0
- package/dist/logistics/eoq.js.map +1 -1
- package/dist/logistics/fillRate.d.ts.map +1 -1
- package/dist/logistics/fillRate.js +1 -17
- package/dist/logistics/fillRate.js.map +1 -1
- package/dist/logistics/safetyStock.d.ts.map +1 -1
- package/dist/logistics/safetyStock.js +2 -55
- package/dist/logistics/safetyStock.js.map +1 -1
- package/dist/machining/boltCircle.d.ts +16 -0
- package/dist/machining/boltCircle.d.ts.map +1 -0
- package/dist/machining/boltCircle.js +36 -0
- package/dist/machining/boltCircle.js.map +1 -0
- package/dist/machining/boringBarDeflection.d.ts +17 -0
- package/dist/machining/boringBarDeflection.d.ts.map +1 -0
- package/dist/machining/boringBarDeflection.js +54 -0
- package/dist/machining/boringBarDeflection.js.map +1 -0
- package/dist/machining/cuspHeight.d.ts +15 -0
- package/dist/machining/cuspHeight.d.ts.map +1 -0
- package/dist/machining/cuspHeight.js +23 -0
- package/dist/machining/cuspHeight.js.map +1 -0
- package/dist/machining/cycleTimeEstimator.d.ts +18 -0
- package/dist/machining/cycleTimeEstimator.d.ts.map +1 -0
- package/dist/machining/cycleTimeEstimator.js +62 -0
- package/dist/machining/cycleTimeEstimator.js.map +1 -0
- package/dist/machining/effectiveDiameter.d.ts +17 -0
- package/dist/machining/effectiveDiameter.d.ts.map +1 -0
- package/dist/machining/effectiveDiameter.js +24 -0
- package/dist/machining/effectiveDiameter.js.map +1 -0
- package/dist/machining/gaugeBlockStack.d.ts +16 -0
- package/dist/machining/gaugeBlockStack.d.ts.map +1 -0
- package/dist/machining/gaugeBlockStack.js +138 -0
- package/dist/machining/gaugeBlockStack.js.map +1 -0
- package/dist/machining/index.d.ts +14 -0
- package/dist/machining/index.d.ts.map +1 -0
- package/dist/machining/index.js +14 -0
- package/dist/machining/index.js.map +1 -0
- package/dist/machining/radialChipThinning.d.ts +18 -0
- package/dist/machining/radialChipThinning.d.ts.map +1 -0
- package/dist/machining/radialChipThinning.js +30 -0
- package/dist/machining/radialChipThinning.js.map +1 -0
- package/dist/machining/sineBarHeight.d.ts +16 -0
- package/dist/machining/sineBarHeight.d.ts.map +1 -0
- package/dist/machining/sineBarHeight.js +32 -0
- package/dist/machining/sineBarHeight.js.map +1 -0
- package/dist/machining/threadOverWires.d.ts +21 -0
- package/dist/machining/threadOverWires.d.ts.map +1 -0
- package/dist/machining/threadOverWires.js +54 -0
- package/dist/machining/threadOverWires.js.map +1 -0
- package/dist/machining/toolDeflection.d.ts +16 -0
- package/dist/machining/toolDeflection.d.ts.map +1 -0
- package/dist/machining/toolDeflection.js +36 -0
- package/dist/machining/toolDeflection.js.map +1 -0
- package/dist/machining/triangleSolver.d.ts +21 -0
- package/dist/machining/triangleSolver.d.ts.map +1 -0
- package/dist/machining/triangleSolver.js +120 -0
- package/dist/machining/triangleSolver.js.map +1 -0
- package/dist/machining/truePosition.d.ts +19 -0
- package/dist/machining/truePosition.d.ts.map +1 -0
- package/dist/machining/truePosition.js +44 -0
- package/dist/machining/truePosition.js.map +1 -0
- package/dist/machining/types.d.ts +201 -0
- package/dist/machining/types.d.ts.map +1 -0
- package/dist/machining/types.js +2 -0
- package/dist/machining/types.js.map +1 -0
- package/dist/math.d.ts +26 -0
- package/dist/math.d.ts.map +1 -0
- package/dist/math.js +95 -0
- package/dist/math.js.map +1 -0
- package/dist/metal/bearing.d.ts.map +1 -1
- package/dist/metal/bearing.js +1 -4
- package/dist/metal/bearing.js.map +1 -1
- package/dist/metal/bendAllowance.d.ts.map +1 -1
- package/dist/metal/bendAllowance.js +2 -1
- package/dist/metal/bendAllowance.js.map +1 -1
- package/dist/metal/bolt.d.ts.map +1 -1
- package/dist/metal/bolt.js +4 -7
- package/dist/metal/bolt.js.map +1 -1
- package/dist/metal/cutting.d.ts.map +1 -1
- package/dist/metal/cutting.js +1 -4
- package/dist/metal/cutting.js.map +1 -1
- package/dist/metal/cuttingStock.d.ts.map +1 -1
- package/dist/metal/cuttingStock.js +1 -4
- package/dist/metal/cuttingStock.js.map +1 -1
- package/dist/metal/flangeSpec.d.ts +10 -0
- package/dist/metal/flangeSpec.d.ts.map +1 -0
- package/dist/metal/flangeSpec.js +81 -0
- package/dist/metal/flangeSpec.js.map +1 -0
- package/dist/metal/gear.d.ts.map +1 -1
- package/dist/metal/gear.js +1 -4
- package/dist/metal/gear.js.map +1 -1
- package/dist/metal/hardness.d.ts.map +1 -1
- package/dist/metal/hardness.js +1 -4
- package/dist/metal/hardness.js.map +1 -1
- package/dist/metal/index.d.ts +4 -1
- package/dist/metal/index.d.ts.map +1 -1
- package/dist/metal/index.js +3 -0
- package/dist/metal/index.js.map +1 -1
- package/dist/metal/materialGradeConverter.d.ts +10 -0
- package/dist/metal/materialGradeConverter.d.ts.map +1 -0
- package/dist/metal/materialGradeConverter.js +78 -0
- package/dist/metal/materialGradeConverter.js.map +1 -0
- package/dist/metal/metalWeight.d.ts +13 -3
- package/dist/metal/metalWeight.d.ts.map +1 -1
- package/dist/metal/metalWeight.js +24 -35
- package/dist/metal/metalWeight.js.map +1 -1
- package/dist/metal/pipeSpec.d.ts +10 -0
- package/dist/metal/pipeSpec.d.ts.map +1 -0
- package/dist/metal/pipeSpec.js +96 -0
- package/dist/metal/pipeSpec.js.map +1 -0
- package/dist/metal/pressFit.d.ts.map +1 -1
- package/dist/metal/pressFit.js +1 -4
- package/dist/metal/pressFit.js.map +1 -1
- package/dist/metal/pressTonnage.d.ts +10 -4
- package/dist/metal/pressTonnage.d.ts.map +1 -1
- package/dist/metal/pressTonnage.js +199 -25
- package/dist/metal/pressTonnage.js.map +1 -1
- package/dist/metal/roughness.d.ts.map +1 -1
- package/dist/metal/roughness.js +2 -5
- package/dist/metal/roughness.js.map +1 -1
- package/dist/metal/screw.d.ts.map +1 -1
- package/dist/metal/screw.js +1 -4
- package/dist/metal/screw.js.map +1 -1
- package/dist/metal/spring.d.ts.map +1 -1
- package/dist/metal/spring.js +1 -4
- package/dist/metal/spring.js.map +1 -1
- package/dist/metal/tap.d.ts.map +1 -1
- package/dist/metal/tap.js +1 -4
- package/dist/metal/tap.js.map +1 -1
- package/dist/metal/thread.d.ts.map +1 -1
- package/dist/metal/thread.js +1 -4
- package/dist/metal/thread.js.map +1 -1
- package/dist/metal/tolerance.d.ts.map +1 -1
- package/dist/metal/tolerance.js +1 -4
- package/dist/metal/tolerance.js.map +1 -1
- package/dist/metal/types.d.ts +100 -13
- package/dist/metal/types.d.ts.map +1 -1
- package/dist/metal/vibration.d.ts.map +1 -1
- package/dist/metal/vibration.js +1 -4
- package/dist/metal/vibration.js.map +1 -1
- package/dist/metal/weldHeat.d.ts +2 -1
- package/dist/metal/weldHeat.d.ts.map +1 -1
- package/dist/metal/weldHeat.js +203 -44
- package/dist/metal/weldHeat.js.map +1 -1
- package/dist/metal/welding.d.ts.map +1 -1
- package/dist/metal/welding.js +3 -2
- package/dist/metal/welding.js.map +1 -1
- package/dist/quality/aql.d.ts.map +1 -1
- package/dist/quality/aql.js +1 -4
- package/dist/quality/aql.js.map +1 -1
- package/dist/quality/controlChart.d.ts +26 -0
- package/dist/quality/controlChart.d.ts.map +1 -0
- package/dist/quality/controlChart.js +216 -0
- package/dist/quality/controlChart.js.map +1 -0
- package/dist/quality/cpk.d.ts +16 -4
- package/dist/quality/cpk.d.ts.map +1 -1
- package/dist/quality/cpk.js +16 -4
- package/dist/quality/cpk.js.map +1 -1
- package/dist/quality/downtime.d.ts.map +1 -1
- package/dist/quality/downtime.js +1 -4
- package/dist/quality/downtime.js.map +1 -1
- package/dist/quality/dpmo.d.ts.map +1 -1
- package/dist/quality/dpmo.js +2 -65
- package/dist/quality/dpmo.js.map +1 -1
- package/dist/quality/index.d.ts +2 -1
- package/dist/quality/index.d.ts.map +1 -1
- package/dist/quality/index.js +1 -0
- package/dist/quality/index.js.map +1 -1
- package/dist/quality/lineBalancing.d.ts.map +1 -1
- package/dist/quality/lineBalancing.js +1 -4
- package/dist/quality/lineBalancing.js.map +1 -1
- package/dist/quality/mtbf.d.ts.map +1 -1
- package/dist/quality/mtbf.js +1 -4
- package/dist/quality/mtbf.js.map +1 -1
- package/dist/quality/oee.d.ts +13 -1
- package/dist/quality/oee.d.ts.map +1 -1
- package/dist/quality/oee.js +30 -9
- package/dist/quality/oee.js.map +1 -1
- package/dist/quality/ppk.d.ts.map +1 -1
- package/dist/quality/ppk.js +2 -20
- package/dist/quality/ppk.js.map +1 -1
- package/dist/quality/ppm.d.ts.map +1 -1
- package/dist/quality/ppm.js +2 -84
- package/dist/quality/ppm.js.map +1 -1
- package/dist/quality/rpn.d.ts.map +1 -1
- package/dist/quality/rpn.js +1 -4
- package/dist/quality/rpn.js.map +1 -1
- package/dist/quality/types.d.ts +31 -0
- package/dist/quality/types.d.ts.map +1 -1
- package/dist/quality/yield.d.ts.map +1 -1
- package/dist/quality/yield.js +1 -4
- package/dist/quality/yield.js.map +1 -1
- package/dist/safety/fallClearance.d.ts +12 -3
- package/dist/safety/fallClearance.d.ts.map +1 -1
- package/dist/safety/fallClearance.js +73 -17
- package/dist/safety/fallClearance.js.map +1 -1
- package/dist/safety/index.d.ts +2 -1
- package/dist/safety/index.d.ts.map +1 -1
- package/dist/safety/index.js +1 -0
- package/dist/safety/index.js.map +1 -1
- package/dist/safety/nioshLifting.d.ts +19 -10
- package/dist/safety/nioshLifting.d.ts.map +1 -1
- package/dist/safety/nioshLifting.js +19 -10
- package/dist/safety/nioshLifting.js.map +1 -1
- package/dist/safety/types.d.ts +25 -0
- package/dist/safety/types.d.ts.map +1 -1
- package/dist/safety/ventilationRate.d.ts +12 -0
- package/dist/safety/ventilationRate.d.ts.map +1 -0
- package/dist/safety/ventilationRate.js +71 -0
- package/dist/safety/ventilationRate.js.map +1 -0
- package/dist/utility/assignment.d.ts.map +1 -1
- package/dist/utility/assignment.js +1 -7
- package/dist/utility/assignment.js.map +1 -1
- package/dist/utility/index.d.ts +2 -2
- package/dist/utility/index.d.ts.map +1 -1
- package/dist/utility/index.js +1 -1
- package/dist/utility/index.js.map +1 -1
- package/dist/utility/types.d.ts +0 -16
- package/dist/utility/types.d.ts.map +1 -1
- package/dist/utility/unit.d.ts +1 -1
- package/dist/utility/unit.d.ts.map +1 -1
- package/dist/utility/unit.js +2 -8
- package/dist/utility/unit.js.map +1 -1
- package/dist/utils.d.ts +5 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +11 -2
- package/dist/utils.js.map +1 -1
- package/package.json +37 -4
- package/dist/utility/qrcode.d.ts +0 -30
- package/dist/utility/qrcode.d.ts.map +0 -1
- package/dist/utility/qrcode.js +0 -30
- package/dist/utility/qrcode.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,288 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.
|
|
8
|
+
## [0.5.0] - 2026-02-07
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Machining** (new domain, 12 functions):
|
|
13
|
+
- `truePosition()` — GD&T True Position with MMC bonus tolerance (ASME Y14.5)
|
|
14
|
+
- `boltCircle()` — Bolt hole pattern coordinate calculation
|
|
15
|
+
- `sineBarHeight()` — Sine bar gauge block height with rounding error analysis
|
|
16
|
+
- `radialChipThinning()` — Radial chip thinning compensation for light cuts
|
|
17
|
+
- `toolDeflection()` — End mill cantilever deflection (carbide/HSS)
|
|
18
|
+
- `cuspHeight()` — Ball end mill scallop height and surface roughness
|
|
19
|
+
- `effectiveDiameter()` — Ball end mill effective cutting diameter at depth
|
|
20
|
+
- `boringBarDeflection()` — Boring bar deflection with L/D ratio guidance
|
|
21
|
+
- `threadOverWires()` — 3-wire thread measurement (60°/55°/29°/30° angles)
|
|
22
|
+
- `gaugeBlockStack()` — Gauge block combination using successive subtraction (47/88/81-pc sets)
|
|
23
|
+
- `triangleSolver()` — Triangle solver (SSS/SAS/ASA/AAS/SSA with law of cosines/sines)
|
|
24
|
+
- `cycleTimeEstimator()` — CNC cycle time estimation with operation breakdown
|
|
25
|
+
|
|
26
|
+
## [0.4.0] - 2026-02-07
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- **Battery** (new domain, 10 functions):
|
|
31
|
+
- `energyDensity()` — Wh/kg and Wh/L energy density calculation
|
|
32
|
+
- `cRate()` — C-rate ↔ current/time bidirectional conversion
|
|
33
|
+
- `stateOfHealth()` — SOH % with degradation status thresholds (IEEE 1188)
|
|
34
|
+
- `batteryPackConfig()` — Series/parallel cell configuration calculator
|
|
35
|
+
- `cycleLife()` — Cycle life estimation with chemistry (7 types), DOD, and temperature factors
|
|
36
|
+
- `internalResistance()` — DCIR calculation from OCV and load voltage (IEC 61960)
|
|
37
|
+
- `selfDischarge()` — Self-discharge rate (daily and monthly %)
|
|
38
|
+
- `thermalRunaway()` — Thermal safety margin analysis (SAE J2464)
|
|
39
|
+
- `bmsBalancing()` — BMS passive cell balancing time estimation
|
|
40
|
+
- `chargingProfile()` — CC-CV charging profile timing with phase breakdown
|
|
41
|
+
|
|
42
|
+
- **Environmental** (new domain, 10 functions):
|
|
43
|
+
- `scope1Emissions()` — Direct combustion emissions with 6 fuel types (EPA/IPCC 2006 factors)
|
|
44
|
+
- `scope2Emissions()` — Purchased electricity emissions for 12 grid regions (IEA 2023 factors)
|
|
45
|
+
- `scope3Emissions()` — Supply chain spend-based emissions for 8 Scope 3 categories (EPA EEIO)
|
|
46
|
+
- `vocEmissions()` — VOC emissions with capture/destruction efficiency
|
|
47
|
+
- `productCarbonFootprint()` — Product lifecycle carbon footprint with stage breakdown (ISO 14067)
|
|
48
|
+
- `gwpCalculator()` — GWP conversion for 8 GHG gases × 3 time horizons (IPCC AR6)
|
|
49
|
+
- `energyIntensity()` — Energy intensity per unit/revenue (ISO 50001)
|
|
50
|
+
- `waterFootprint()` — Water footprint blue/green/grey breakdown (ISO 14046)
|
|
51
|
+
- `emissionsIntensity()` — Emissions intensity per unit/revenue/employee
|
|
52
|
+
- `esgSummary()` — ESG reduction tracking with projections (TCFD/CDP/SBTi)
|
|
53
|
+
|
|
54
|
+
- **Metal** (3 new functions, 22 → 25):
|
|
55
|
+
- `materialGradeConverter()` — ASTM/EN/JIS/GB/KS grade cross-reference (20 grades × 5 standards)
|
|
56
|
+
- `pipeSpec()` — ANSI/ASME B36.10 pipe dimensions lookup (15 sizes × 6 schedules)
|
|
57
|
+
- `flangeSpec()` — ASME B16.5 WN flange dimensions lookup (8 sizes × 3 pressure classes)
|
|
58
|
+
|
|
59
|
+
### Changed
|
|
60
|
+
|
|
61
|
+
- Total domains: 11 → 13
|
|
62
|
+
- Total function count: 111 → 134 (+23)
|
|
63
|
+
- Total test count: 1705 → 1887 (+182)
|
|
64
|
+
|
|
65
|
+
## [0.3.0] - 2026-02-06
|
|
66
|
+
|
|
67
|
+
### Added
|
|
68
|
+
|
|
69
|
+
- **Quality**: `controlChart()` — SPC X-bar/R and X-bar/S control charts with AIAG/ASTM E2587 constants (n=2..25)
|
|
70
|
+
- **Chemical**: `pipeFlow()` — Darcy-Weisbach pipe flow calculator with Swamee-Jain friction factor (laminar/transitional/turbulent)
|
|
71
|
+
- **Chemical**: `heatTransfer()` — Three modes: conduction (Fourier), convection (Newton), radiation (Stefan-Boltzmann)
|
|
72
|
+
- **Construction**: `momentOfInertia()` — Section properties (A, Ix, Iy, Sx, Sy, rx, ry) for 7 cross-section shapes (rectangle, circle, hollow rectangle, hollow circle, I-beam, T-section, C-channel)
|
|
73
|
+
- **Electronics**: `ohmsLaw()` — V/I/R/P calculator with discriminated union input
|
|
74
|
+
- **Energy**: `solarOutput()` — Solar panel output estimation based on PVWatts methodology
|
|
75
|
+
- **Safety**: `ventilationRate()` — Required ventilation rate (ACH/CFM/L/s) per ASHRAE 62.1 / OSHA guidelines
|
|
76
|
+
- **Automotive**: `brakingDistance()` — Stopping distance calculator per AASHTO method with grade adjustment
|
|
77
|
+
|
|
78
|
+
### Changed
|
|
79
|
+
|
|
80
|
+
- Total function count: 103 → 111
|
|
81
|
+
- Total test count: 1630 → 1705
|
|
82
|
+
|
|
83
|
+
## [0.2.0] - 2026-02-06
|
|
84
|
+
|
|
85
|
+
### Breaking Changes
|
|
86
|
+
- **`MetalWeightInput`**: Now a discriminated union by `shape`. Each shape variant requires its specific fields (e.g., `shape: 'plate'` requires `width` and `thickness`). The `materialName` field is now a `MaterialName` literal union type instead of `string`.
|
|
87
|
+
- **`DilutionInput`**: Now a discriminated union by `solveFor`. Each variant provides exactly the three known values, eliminating optional fields and `!` assertions.
|
|
88
|
+
- **`ReactorInput`**: Now a discriminated union by `shape`. `shape: 'cylindrical'` requires `height`; `shape: 'spherical'` does not accept `height`.
|
|
89
|
+
- **`BoltInput`**: Now a discriminated union by `mode`. `mode: 'torqueToPreload'` requires `torque`; `mode: 'preloadToTorque'` requires `preload`.
|
|
90
|
+
- **QR code types removed**: `QrcodeInput`, `QrcodeResult`, `ErrorCorrectionLevel` types and `qrcode.ts` module removed from `formulab/utility` (was empty shell with no implementation).
|
|
91
|
+
|
|
92
|
+
### Enhanced
|
|
93
|
+
- **`roundTo()`**: Fixed negative number rounding (`-2.555` now correctly rounds to `-2.56` instead of `-2.55`). Uses sign-aware epsilon correction.
|
|
94
|
+
- **`oee()`**: Results now consistently rounded via `roundTo()` (factors to 4 decimals, percentages to 1 decimal).
|
|
95
|
+
|
|
96
|
+
### Fixed
|
|
97
|
+
- **Duplicate code removal**: Consolidated `normalCDF()`, `normalInvCDF()`, and `clamp()` from 6 files into shared `math.ts` module.
|
|
98
|
+
- **`Math.round` inconsistency**: Replaced manual `Math.round(x * N) / N` patterns with `roundTo()` in 8 files (`metalWeight`, `fallClearance`, `welding`, `carbonFootprint`, `powerCost`, `bendAllowance`, `weldHeat`, `roughness`).
|
|
99
|
+
- **Duplicate test file**: Removed `src/metal/pressTonnage.test.ts` (14 duplicate tests); canonical version at `src/metal/__tests__/pressTonnage.test.ts` (19 tests) retained.
|
|
100
|
+
|
|
101
|
+
### Changed
|
|
102
|
+
- **Coverage thresholds**: Raised from baseline (5% lines) to realistic levels (90% lines, 95% functions, 85% branches, 90% statements).
|
|
103
|
+
- Total test count: 1630 tests across 102 test files.
|
|
104
|
+
|
|
105
|
+
## [0.1.11] - 2026-02-06
|
|
106
|
+
|
|
107
|
+
### Enhanced
|
|
108
|
+
- **`fallClearance()`**: Complete rewrite with ANSI Z359.1/Z359.4 compliance
|
|
109
|
+
- Added `rescueClearance` parameter (default 0.9m per ANSI Z359.4)
|
|
110
|
+
- Added `obstacleHeight` parameter for elevated obstacle detection
|
|
111
|
+
- Added `freeSpaceRequired` and `clearanceAboveObstacle` outputs
|
|
112
|
+
- Added `warnings` array with validation against OSHA/ANSI limits
|
|
113
|
+
- Separated physical fall distance from safety factor (correct per standards)
|
|
114
|
+
|
|
115
|
+
- **`weldHeat()`**: Major enhancement with industry standards
|
|
116
|
+
- Added AWS D1.1:2020 Table 5.8 preheat requirements with CE×thickness interaction
|
|
117
|
+
- Added Rosenthal cooling time equations (t8/5) for thick and thin plate heat flow
|
|
118
|
+
- Added Yurioka HAZ hardness formula with cooling rate factor
|
|
119
|
+
- Added Carbon Equivalent Pcm formula for low-alloy steels (C < 0.18%)
|
|
120
|
+
- Added hydrogen control level determination
|
|
121
|
+
- Added source attribution for preheat recommendations
|
|
122
|
+
|
|
123
|
+
- **`pressTonnage()`**: Deep drawing enhancements with DIN 8584 basis
|
|
124
|
+
- Added Siebel formula for drawing force with friction and bending effects
|
|
125
|
+
- Added blank holder force calculation: F_bh = π/4 × (D² - d²) × p_bh
|
|
126
|
+
- Added multi-draw detection and estimation for deep draws (d/D < 0.55)
|
|
127
|
+
- Added `frictionCoefficient`, `blankHolderPressure`, `dieRadius` parameters
|
|
128
|
+
- Added `warnings` array for process risk assessment
|
|
129
|
+
|
|
130
|
+
### Added
|
|
131
|
+
- **Test suite**: `pressTonnage` (19 test cases covering blanking, bending, enhanced drawing)
|
|
132
|
+
- Total test count: 1648 tests across 103 test files
|
|
133
|
+
|
|
134
|
+
### Changed
|
|
135
|
+
- Formula review completed for high-risk domains (safety, metal)
|
|
136
|
+
- Three functions upgraded from 70-85% to 95%+ theoretical completeness
|
|
137
|
+
|
|
138
|
+
## [0.1.10] - 2026-02-06
|
|
139
|
+
|
|
140
|
+
### Added
|
|
141
|
+
- **Test suites (Cycle 14)**: 28개 함수 완전 테스트 추가 (437 test cases)
|
|
142
|
+
- metal: `bendAllowance`, `bolt`, `cuttingStock`, `flatPattern`, `gear`, `kFactorReverse`, `material`, `pressFit`, `pressTonnage`, `roughness`, `screw`, `spring`, `tap`, `thread`, `tolerance`, `vibration`, `weldHeat`, `welding`
|
|
143
|
+
- logistics: `containerFit`, `fillRate`, `freightClass`, `pallet3d`, `palletStack`, `pickTime`, `shipping`, `tsp`
|
|
144
|
+
- construction: `roof`, `stair`
|
|
145
|
+
- Total test count: 1622 tests across 102 test files
|
|
146
|
+
|
|
147
|
+
### Changed
|
|
148
|
+
- Coverage dramatically improved: 62.09% → 98.11% lines (+36.02%)
|
|
149
|
+
- Branch coverage: 88.72% → 90.55%
|
|
150
|
+
- Function coverage: 89.63% → 100%
|
|
151
|
+
- All domains now have 95%+ line coverage
|
|
152
|
+
- **Milestone**: 100% function coverage achieved, 98%+ line coverage, library fully tested
|
|
153
|
+
|
|
154
|
+
## [0.1.9] - 2026-02-05
|
|
155
|
+
|
|
156
|
+
### Added
|
|
157
|
+
- **Test suites (Cycle 13)**: 25개 함수 대규모 테스트 추가 (488 test cases)
|
|
158
|
+
- quality: `aql`, `cycle`, `downtime`, `lineBalancing`, `ppk`
|
|
159
|
+
- chemical: `concentration`, `ph`, `reactor`, `shelfLife`, `injectionCycle`
|
|
160
|
+
- electronics: `reflow`, `resistor`, `smt-takt`, `solder`, `trace`, `capacitor`, `stencil`, `via`
|
|
161
|
+
- construction: `beamLoad`, `concreteMix`, `formwork`, `rebar`, `aggregate`, `brick`, `pert`
|
|
162
|
+
- Total test count: 1185 tests across 74 test files
|
|
163
|
+
|
|
164
|
+
### Changed
|
|
165
|
+
- Coverage improved: 36.46% → 62.09% lines (+25.63%)
|
|
166
|
+
- quality 도메인: 98.68% lines
|
|
167
|
+
- chemical 도메인: 99.40% lines
|
|
168
|
+
- electronics 도메인: 98.37% lines
|
|
169
|
+
- construction 도메인: 83.30% lines
|
|
170
|
+
- **Milestone**: Line coverage 60% 돌파, 6개 도메인 90%+ 커버리지 달성
|
|
171
|
+
|
|
172
|
+
## [0.1.8] - 2026-02-05
|
|
173
|
+
|
|
174
|
+
### Added
|
|
175
|
+
- **Test suites (Cycle 11)**: `yieldCalc`, `rpn`, `ppm` (quality), `safetyStock`, `kanban` (logistics)
|
|
176
|
+
- **Test suites (Cycle 12)**: 17개 함수 대규모 테스트 추가
|
|
177
|
+
- safety: `fallClearance`, `noiseExposure`, `wbgtCalculate`, `havsCalculate`, `respiratorCalculate`
|
|
178
|
+
- food: `haccp`, `expiry`
|
|
179
|
+
- automotive: `batteryRuntime`, `evCharging`, `fuelEconomy`, `tireCompare`, `torque`, `power`
|
|
180
|
+
- energy: `compressedAirCost`, `motorEfficiency`, `pfCorrection`, `vfdSavings`
|
|
181
|
+
- Total test count: 697 tests across 49 test files
|
|
182
|
+
|
|
183
|
+
### Changed
|
|
184
|
+
- Coverage improved: 20.74% → 36.46% lines (+15.72%)
|
|
185
|
+
- safety 도메인: 39.63% → 100% lines
|
|
186
|
+
- food 도메인: 45.45% → 100% lines
|
|
187
|
+
- automotive 도메인: 11.89% → 68.96% lines
|
|
188
|
+
- energy 도메인: 26.45% → 100% lines
|
|
189
|
+
- **Milestone**: Line coverage 35% 돌파, 4개 도메인 100% 커버리지 달성
|
|
190
|
+
|
|
191
|
+
## [0.1.7] - 2026-02-05
|
|
192
|
+
|
|
193
|
+
### Added
|
|
194
|
+
- **Test suites**: `cutting`, `bearing`, `hardness` (metal domain, 45 test cases)
|
|
195
|
+
- Total test count: 371 tests across 27 test files
|
|
196
|
+
|
|
197
|
+
### Changed
|
|
198
|
+
- Coverage improved: 18.71% → 20.74% lines (+2.03%)
|
|
199
|
+
- metal 도메인: 4.78% → 11.54% lines
|
|
200
|
+
- **Milestone**: Line coverage 20% 돌파
|
|
201
|
+
|
|
202
|
+
## [0.1.6] - 2026-02-05
|
|
203
|
+
|
|
204
|
+
### Added
|
|
205
|
+
- **Test suites**: `calculateUnit`, `getUnitCategories`, `getUnitsForCategory` (unit conversion, 29 test cases)
|
|
206
|
+
- **Test suites**: `solveAssignment` (Hungarian algorithm, 12 test cases)
|
|
207
|
+
- Total test count: 326 tests across 24 test files
|
|
208
|
+
|
|
209
|
+
### Changed
|
|
210
|
+
- Coverage improved: 15.21% → 18.71% lines (+3.5%)
|
|
211
|
+
- utility 도메인: 0% → 78.83% lines
|
|
212
|
+
- Branches coverage: 76.89% → 80.96%
|
|
213
|
+
|
|
214
|
+
## [0.1.5] - 2026-02-05
|
|
215
|
+
|
|
216
|
+
### Added
|
|
217
|
+
- **Test suites**: `ledResistor`, `awgProperties` (electronics domain, 33 test cases)
|
|
218
|
+
- **Test suites**: `calorie`, `nutrition` (food domain, 23 test cases)
|
|
219
|
+
- Total test count: 285 tests across 22 test files
|
|
220
|
+
|
|
221
|
+
### Changed
|
|
222
|
+
- Coverage improved: 12.08% → 15.21% lines
|
|
223
|
+
- electronics 도메인: 0% → 18.77% lines
|
|
224
|
+
- food 도메인: 0% → 45.45% lines
|
|
225
|
+
|
|
226
|
+
## [0.1.4] - 2026-02-05
|
|
227
|
+
|
|
228
|
+
### Added
|
|
229
|
+
- **Test suites**: `slope`, `earthwork` (construction domain, 27 test cases)
|
|
230
|
+
- **Test suites**: `powerCost`, `carbonFootprint` (energy domain, 24 test cases)
|
|
231
|
+
- Total test count: 229 tests across 18 test files
|
|
232
|
+
|
|
233
|
+
### Changed
|
|
234
|
+
- Coverage improved: 10.38% → 12.08% lines
|
|
235
|
+
- construction 도메인: 0% → 7.73% lines
|
|
236
|
+
- energy 도메인: 0% → 26.45% lines
|
|
237
|
+
|
|
238
|
+
## [0.1.3] - 2026-02-05
|
|
239
|
+
|
|
240
|
+
### Added
|
|
241
|
+
- **Test suites**: `dilution`, `batch` (chemical domain, 25 test cases)
|
|
242
|
+
- **Input validation tests**: `eoq` validation edge cases (5 test cases)
|
|
243
|
+
- Total test count: 178 tests across 14 test files
|
|
244
|
+
|
|
245
|
+
### Fixed
|
|
246
|
+
- **`eoq()` input validation**: Returns zeros for invalid inputs (negative/zero demand, cost)
|
|
247
|
+
- **`gearRatio()` NaN bug**: `mechanicalAdvantage` now returns 0 when `inputTorque` is 0
|
|
248
|
+
|
|
249
|
+
### Changed
|
|
250
|
+
- Coverage improved: 8.8% → 10.38% lines
|
|
251
|
+
|
|
252
|
+
## [0.1.2] - 2026-02-05
|
|
253
|
+
|
|
254
|
+
### Added
|
|
255
|
+
- **Test suites**: `eoq`, `dimWeight`, `gearRatio` (40 additional test cases)
|
|
256
|
+
- Total test count: 148 tests across 12 test files
|
|
257
|
+
- Coverage measurement infrastructure fully operational
|
|
258
|
+
|
|
259
|
+
### Fixed
|
|
260
|
+
- **Coverage tool version mismatch**: Downgraded `@vitest/coverage-v8` from 4.x to 3.x to match vitest 3.x
|
|
261
|
+
|
|
262
|
+
### Changed
|
|
263
|
+
- **Coverage thresholds**: Adjusted to realistic baseline (lines: 5%, functions: 50%, branches: 50%)
|
|
264
|
+
- Current coverage metrics: 8.8% lines, 62.38% functions, 72.25% branches
|
|
265
|
+
|
|
266
|
+
## [0.1.1] - 2026-02-05
|
|
267
|
+
|
|
268
|
+
### Fixed
|
|
269
|
+
- **Main entry point**: Added missing exports for 5 domains (metal, chemical, electronics, construction, energy)
|
|
270
|
+
- **`roundTo()` precision bug**: Fixed IEEE 754 floating-point rounding issues (e.g., `roundTo(0.615, 2)` now correctly returns `0.62`)
|
|
271
|
+
- **Massive duplicate code removal**: Consolidated `roundTo()` from 36 files to single source in `utils.ts`
|
|
272
|
+
- Removed from: quality (8 files), metal (15 files), electronics (8 files), chemical (3 files)
|
|
273
|
+
- **README documentation**: Updated all API examples to match actual implementation
|
|
274
|
+
|
|
275
|
+
### Changed
|
|
276
|
+
- **BREAKING**: `GearInput` → `GearRatioInput` (automotive domain) to avoid collision with metal domain
|
|
277
|
+
- **BREAKING**: `GearResult` → `GearRatioResult` (automotive domain)
|
|
278
|
+
- **BREAKING**: `getCategories()` → `getUnitCategories()` (utility domain) to avoid collision with metal domain
|
|
279
|
+
- Removed `--passWithNoTests` flag from test script (tests are now mandatory)
|
|
280
|
+
|
|
281
|
+
### Added
|
|
282
|
+
- Input validation for `oee()`: throws error when `goodCount > totalCount`
|
|
283
|
+
- Input validation for `oee()`: throws error when `goodCount < 0`
|
|
284
|
+
- Test suites: `oee`, `cpk`, `taktTime`, `dpmo`, `mtbf`, `metalWeight`, `cbm`, `nioshLifting`, `roundTo` (108 test cases)
|
|
285
|
+
- NaN/Infinity handling in `roundTo()`
|
|
286
|
+
- Vitest coverage configuration with thresholds
|
|
287
|
+
- `test:coverage` npm script
|
|
288
|
+
|
|
289
|
+
## [0.1.0] - 2026-02-05
|
|
9
290
|
|
|
10
291
|
### Added
|
|
11
292
|
|
|
@@ -134,7 +415,7 @@ Initial release with 103 calculation functions across 11 domains.
|
|
|
134
415
|
#### Utility (3 functions)
|
|
135
416
|
- `solveAssignment()` - Hungarian algorithm optimization
|
|
136
417
|
- `calculateUnit()` - Unit conversion
|
|
137
|
-
- `
|
|
418
|
+
- `getUnitCategories()` - Get unit categories
|
|
138
419
|
|
|
139
420
|
### Technical Features
|
|
140
421
|
- Zero dependencies
|
package/README.md
CHANGED
|
@@ -10,14 +10,36 @@ A comprehensive collection of engineering formulas and calculations for manufact
|
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
13
|
+
- **146 industrial calculations** — OEE, Cpk, SPC control charts, metal weight, CNC machining, GD&T, pipe flow, CBM, NIOSH lifting, battery SOH, GHG emissions, and more
|
|
14
|
+
- **14 specialized domains** — Quality, Metal, Chemical, Electronics, Construction, Automotive, Logistics, Energy, Safety, Food, Utility, Battery, Environmental, Machining
|
|
15
15
|
- **Zero dependencies** — Lightweight and fast
|
|
16
16
|
- **TypeScript first** — Full type definitions included
|
|
17
17
|
- **Tree-shakeable** — Import only what you need
|
|
18
18
|
- **Well tested** — Comprehensive test coverage
|
|
19
19
|
- **Research-based** — Built on industry standards (ISO, OSHA, NIOSH, IPC)
|
|
20
20
|
|
|
21
|
+
## Verification Status
|
|
22
|
+
|
|
23
|
+
| Domain | Functions | Golden Tests | Key References |
|
|
24
|
+
|--------|-----------|-------------|----------------|
|
|
25
|
+
| Quality | 14 | oee, cpk, controlChart | ISO 22400-2, AIAG/ASTM E2587, JIPM |
|
|
26
|
+
| Metal | 25 | metalWeight | Machinery's Handbook, ASME B36.10/B16.5 |
|
|
27
|
+
| Logistics | 14 | cbm | Physical formula |
|
|
28
|
+
| Safety | 7 | nioshLifting | NIOSH 94-110 |
|
|
29
|
+
| Chemical | 9 | — | Darcy-Weisbach, Fourier |
|
|
30
|
+
| Electronics | 11 | — | IPC-2221 |
|
|
31
|
+
| Construction | 12 | — | AISC, Timoshenko |
|
|
32
|
+
| Automotive | 8 | — | AASHTO |
|
|
33
|
+
| Energy | 7 | — | NREL PVWatts |
|
|
34
|
+
| Food | 4 | — | HACCP |
|
|
35
|
+
| Utility | 3 | — | — |
|
|
36
|
+
| Battery | 10 | — | IEEE 1188, IEC 62620, Battery University |
|
|
37
|
+
| Environmental | 10 | — | GHG Protocol, IPCC AR6, IEA 2023 |
|
|
38
|
+
| Machining | 12 | — | Machinery's Handbook, ASME Y14.5, Sandvik Coromant |
|
|
39
|
+
|
|
40
|
+
> Functions with golden reference tests have been verified against authoritative engineering sources.
|
|
41
|
+
> See each function's JSDoc for specific references.
|
|
42
|
+
|
|
21
43
|
## Installation
|
|
22
44
|
|
|
23
45
|
```bash
|
|
@@ -35,42 +57,50 @@ import { oee, metalWeight, cbm } from 'formulab';
|
|
|
35
57
|
|
|
36
58
|
// Calculate OEE (Overall Equipment Effectiveness)
|
|
37
59
|
const result = oee({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
60
|
+
rawData: {
|
|
61
|
+
plannedTime: 480, // minutes (8 hours)
|
|
62
|
+
runTime: 432, // minutes (90% availability)
|
|
63
|
+
totalCount: 1000,
|
|
64
|
+
goodCount: 990, // 99% quality
|
|
65
|
+
idealCycleTime: 0.456, // minutes per piece (95% performance)
|
|
66
|
+
},
|
|
41
67
|
});
|
|
42
|
-
console.log(result.oee); //
|
|
68
|
+
console.log(result.percentages.oee); // 84.6%
|
|
43
69
|
|
|
44
70
|
// Calculate metal weight
|
|
45
71
|
const weight = metalWeight({
|
|
46
|
-
material: 'steel',
|
|
47
72
|
shape: 'plate',
|
|
48
|
-
|
|
73
|
+
materialName: 'steel',
|
|
74
|
+
length: 1000, // mm
|
|
75
|
+
width: 500, // mm
|
|
76
|
+
thickness: 10, // mm
|
|
49
77
|
});
|
|
50
78
|
console.log(weight.weight); // 39.25 kg
|
|
51
79
|
|
|
52
|
-
// Calculate CBM
|
|
80
|
+
// Calculate CBM (Cubic Meter)
|
|
53
81
|
const volume = cbm({
|
|
54
82
|
length: 120,
|
|
55
83
|
width: 80,
|
|
56
84
|
height: 100,
|
|
57
|
-
|
|
85
|
+
quantity: 1,
|
|
86
|
+
unit: 'cm',
|
|
58
87
|
});
|
|
59
|
-
console.log(volume.
|
|
88
|
+
console.log(volume.totalCbm); // 0.96 m³
|
|
60
89
|
```
|
|
61
90
|
|
|
62
91
|
## Domains
|
|
63
92
|
|
|
64
|
-
### Quality & Production (
|
|
93
|
+
### Quality & Production (14 functions)
|
|
65
94
|
|
|
66
95
|
```typescript
|
|
67
|
-
import { oee, cpk, taktTime, dpmo } from 'formulab/quality';
|
|
96
|
+
import { oee, cpk, taktTime, dpmo, controlChart } from 'formulab/quality';
|
|
68
97
|
```
|
|
69
98
|
|
|
70
99
|
| Function | Description |
|
|
71
100
|
|----------|-------------|
|
|
72
101
|
| `oee()` | Overall Equipment Effectiveness |
|
|
73
102
|
| `cpk()` | Process Capability Index |
|
|
103
|
+
| `controlChart()` | SPC X-bar/R and X-bar/S charts |
|
|
74
104
|
| `cycleTime()` | Cycle Time analysis |
|
|
75
105
|
| `taktTime()` | Takt Time calculation |
|
|
76
106
|
| `aql()` | AQL sampling inspection |
|
|
@@ -83,7 +113,7 @@ import { oee, cpk, taktTime, dpmo } from 'formulab/quality';
|
|
|
83
113
|
| `rpn()` | Risk Priority Number (FMEA) |
|
|
84
114
|
| `yieldCalc()` | First Pass Yield / RTY |
|
|
85
115
|
|
|
86
|
-
### Metal & Machining (
|
|
116
|
+
### Metal & Machining (25 functions)
|
|
87
117
|
|
|
88
118
|
```typescript
|
|
89
119
|
import { metalWeight, bendAllowance, cutting, bearing } from 'formulab/metal';
|
|
@@ -113,11 +143,14 @@ import { metalWeight, bendAllowance, cutting, bearing } from 'formulab/metal';
|
|
|
113
143
|
| `vibration()` | Natural frequency analysis |
|
|
114
144
|
| `weldHeat()` | Weld heat input calculation |
|
|
115
145
|
| `welding()` | Welding parameters |
|
|
146
|
+
| `materialGradeConverter()` | ASTM/EN/JIS/GB/KS grade cross-reference |
|
|
147
|
+
| `pipeSpec()` | ANSI/ASME pipe dimensions lookup |
|
|
148
|
+
| `flangeSpec()` | ASME B16.5 flange dimensions lookup |
|
|
116
149
|
|
|
117
|
-
### Chemical & Process (
|
|
150
|
+
### Chemical & Process (9 functions)
|
|
118
151
|
|
|
119
152
|
```typescript
|
|
120
|
-
import { dilution, concentration, ph, reactor } from 'formulab/chemical';
|
|
153
|
+
import { dilution, concentration, ph, reactor, pipeFlow, heatTransfer } from 'formulab/chemical';
|
|
121
154
|
```
|
|
122
155
|
|
|
123
156
|
| Function | Description |
|
|
@@ -125,19 +158,22 @@ import { dilution, concentration, ph, reactor } from 'formulab/chemical';
|
|
|
125
158
|
| `batch()` | Batch scaling calculation |
|
|
126
159
|
| `concentration()` | Concentration conversion |
|
|
127
160
|
| `dilution()` | Dilution (C1V1 = C2V2) |
|
|
161
|
+
| `heatTransfer()` | Conduction/convection/radiation heat transfer |
|
|
128
162
|
| `ph()` | pH and buffer calculations |
|
|
163
|
+
| `pipeFlow()` | Darcy-Weisbach pipe flow pressure drop |
|
|
129
164
|
| `reactor()` | Reactor sizing |
|
|
130
165
|
| `shelfLife()` | Shelf life prediction (Arrhenius) |
|
|
131
166
|
| `injectionCycle()` | Injection molding cycle time |
|
|
132
167
|
|
|
133
|
-
### Electronics & SMT (
|
|
168
|
+
### Electronics & SMT (11 functions)
|
|
134
169
|
|
|
135
170
|
```typescript
|
|
136
|
-
import { traceWidth, solderPaste, resistorDecode } from 'formulab/electronics';
|
|
171
|
+
import { traceWidth, solderPaste, resistorDecode, ohmsLaw } from 'formulab/electronics';
|
|
137
172
|
```
|
|
138
173
|
|
|
139
174
|
| Function | Description |
|
|
140
175
|
|----------|-------------|
|
|
176
|
+
| `ohmsLaw()` | Ohm's Law V/I/R/P calculator |
|
|
141
177
|
| `reflowProfile()` | Reflow temperature profile |
|
|
142
178
|
| `resistorDecode()` | Resistor color code decoder |
|
|
143
179
|
| `smtTakt()` | SMT line takt time |
|
|
@@ -149,14 +185,15 @@ import { traceWidth, solderPaste, resistorDecode } from 'formulab/electronics';
|
|
|
149
185
|
| `stencilAperture()` | Stencil aperture design |
|
|
150
186
|
| `viaCurrent()` | Via current capacity |
|
|
151
187
|
|
|
152
|
-
### Construction (
|
|
188
|
+
### Construction (12 functions)
|
|
153
189
|
|
|
154
190
|
```typescript
|
|
155
|
-
import { concreteMix, rebarWeight, slope, stair } from 'formulab/construction';
|
|
191
|
+
import { concreteMix, rebarWeight, slope, stair, momentOfInertia } from 'formulab/construction';
|
|
156
192
|
```
|
|
157
193
|
|
|
158
194
|
| Function | Description |
|
|
159
195
|
|----------|-------------|
|
|
196
|
+
| `momentOfInertia()` | Section properties (Ix, Sx, rx) for 7 shapes |
|
|
160
197
|
| `beamLoad()` | Beam load calculation |
|
|
161
198
|
| `concreteMix()` | Concrete mix ratio |
|
|
162
199
|
| `earthwork()` | Earthwork volume |
|
|
@@ -169,14 +206,15 @@ import { concreteMix, rebarWeight, slope, stair } from 'formulab/construction';
|
|
|
169
206
|
| `roof()` | Roof calculation |
|
|
170
207
|
| `stair()` | Stair dimension calculation |
|
|
171
208
|
|
|
172
|
-
### Automotive (
|
|
209
|
+
### Automotive (8 functions)
|
|
173
210
|
|
|
174
211
|
```typescript
|
|
175
|
-
import { batteryRuntime, evCharging, torque } from 'formulab/automotive';
|
|
212
|
+
import { batteryRuntime, evCharging, torque, brakingDistance } from 'formulab/automotive';
|
|
176
213
|
```
|
|
177
214
|
|
|
178
215
|
| Function | Description |
|
|
179
216
|
|----------|-------------|
|
|
217
|
+
| `brakingDistance()` | Stopping distance (AASHTO method) |
|
|
180
218
|
| `batteryRuntime()` | Battery capacity/runtime |
|
|
181
219
|
| `evCharging()` | EV charging time estimation |
|
|
182
220
|
| `fuelEconomy()` | Fuel economy conversion |
|
|
@@ -208,14 +246,15 @@ import { cbm, eoq, safetyStock, kanban } from 'formulab/logistics';
|
|
|
208
246
|
| `shipping()` | Shipping cost estimation |
|
|
209
247
|
| `tsp()` | Traveling salesman problem |
|
|
210
248
|
|
|
211
|
-
### Energy & Utilities (
|
|
249
|
+
### Energy & Utilities (7 functions)
|
|
212
250
|
|
|
213
251
|
```typescript
|
|
214
|
-
import { powerCost, motorEfficiency, carbonFootprint } from 'formulab/energy';
|
|
252
|
+
import { powerCost, motorEfficiency, carbonFootprint, solarOutput } from 'formulab/energy';
|
|
215
253
|
```
|
|
216
254
|
|
|
217
255
|
| Function | Description |
|
|
218
256
|
|----------|-------------|
|
|
257
|
+
| `solarOutput()` | Solar panel output estimation (PVWatts-based) |
|
|
219
258
|
| `carbonFootprint()` | Scope 2 emissions |
|
|
220
259
|
| `compressedAirCost()` | Compressed air cost |
|
|
221
260
|
| `motorEfficiency()` | Motor upgrade ROI |
|
|
@@ -223,14 +262,15 @@ import { powerCost, motorEfficiency, carbonFootprint } from 'formulab/energy';
|
|
|
223
262
|
| `powerCost()` | Electricity cost with demand |
|
|
224
263
|
| `vfdSavings()` | VFD energy savings |
|
|
225
264
|
|
|
226
|
-
### Safety & Ergonomics (
|
|
265
|
+
### Safety & Ergonomics (7 functions)
|
|
227
266
|
|
|
228
267
|
```typescript
|
|
229
|
-
import { nioshLifting, noiseExposure, wbgtCalculate } from 'formulab/safety';
|
|
268
|
+
import { nioshLifting, noiseExposure, wbgtCalculate, ventilationRate } from 'formulab/safety';
|
|
230
269
|
```
|
|
231
270
|
|
|
232
271
|
| Function | Description |
|
|
233
272
|
|----------|-------------|
|
|
273
|
+
| `ventilationRate()` | Required ventilation ACH/CFM (ASHRAE/OSHA) |
|
|
234
274
|
| `fallClearance()` | Fall protection clearance |
|
|
235
275
|
| `nioshLifting()` | NIOSH lifting equation |
|
|
236
276
|
| `noiseExposure()` | TWA/Dose calculation |
|
|
@@ -261,7 +301,66 @@ import { solveAssignment, calculateUnit } from 'formulab/utility';
|
|
|
261
301
|
|----------|-------------|
|
|
262
302
|
| `solveAssignment()` | Hungarian algorithm optimization |
|
|
263
303
|
| `calculateUnit()` | Unit conversion |
|
|
264
|
-
| `
|
|
304
|
+
| `getUnitCategories()` | Get unit categories |
|
|
305
|
+
|
|
306
|
+
### Battery (10 functions)
|
|
307
|
+
|
|
308
|
+
```typescript
|
|
309
|
+
import { energyDensity, cRate, stateOfHealth, cycleLife } from 'formulab/battery';
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
| Function | Description |
|
|
313
|
+
|----------|-------------|
|
|
314
|
+
| `energyDensity()` | Wh/kg and Wh/L energy density |
|
|
315
|
+
| `cRate()` | C-rate ↔ current/time conversion |
|
|
316
|
+
| `stateOfHealth()` | SOH % with degradation status |
|
|
317
|
+
| `batteryPackConfig()` | Series/parallel cell configuration |
|
|
318
|
+
| `cycleLife()` | Cycle life estimation (chemistry/DOD/temp) |
|
|
319
|
+
| `internalResistance()` | DCIR from OCV and load voltage |
|
|
320
|
+
| `selfDischarge()` | Self-discharge rate calculation |
|
|
321
|
+
| `thermalRunaway()` | Thermal safety margin analysis |
|
|
322
|
+
| `bmsBalancing()` | BMS cell balancing time estimation |
|
|
323
|
+
| `chargingProfile()` | CC-CV charging profile timing |
|
|
324
|
+
|
|
325
|
+
### Environmental (10 functions)
|
|
326
|
+
|
|
327
|
+
```typescript
|
|
328
|
+
import { scope1Emissions, scope2Emissions, gwpCalculator, esgSummary } from 'formulab/environmental';
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
| Function | Description |
|
|
332
|
+
|----------|-------------|
|
|
333
|
+
| `scope1Emissions()` | Fuel combustion direct emissions (6 fuels) |
|
|
334
|
+
| `scope2Emissions()` | Purchased electricity emissions (12 regions) |
|
|
335
|
+
| `scope3Emissions()` | Supply chain spend-based emissions (8 categories) |
|
|
336
|
+
| `vocEmissions()` | VOC emissions with capture/destruction |
|
|
337
|
+
| `productCarbonFootprint()` | Product lifecycle carbon footprint |
|
|
338
|
+
| `gwpCalculator()` | GWP conversion (8 gases × 3 time horizons) |
|
|
339
|
+
| `energyIntensity()` | Energy intensity (MJ/unit, kWh/unit) |
|
|
340
|
+
| `waterFootprint()` | Water footprint (blue/green/grey) |
|
|
341
|
+
| `emissionsIntensity()` | Emissions intensity per unit/revenue/employee |
|
|
342
|
+
| `esgSummary()` | ESG reduction tracking and projections |
|
|
343
|
+
|
|
344
|
+
### Machining & CNC (12 functions)
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
import { truePosition, boltCircle, toolDeflection, threadOverWires } from 'formulab/machining';
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
| Function | Description |
|
|
351
|
+
|----------|-------------|
|
|
352
|
+
| `truePosition()` | GD&T True Position (diametral, MMC bonus) |
|
|
353
|
+
| `boltCircle()` | Bolt hole pattern coordinates |
|
|
354
|
+
| `sineBarHeight()` | Sine bar gauge block height |
|
|
355
|
+
| `radialChipThinning()` | Chip load compensation for light radial cuts |
|
|
356
|
+
| `toolDeflection()` | End mill cantilever deflection |
|
|
357
|
+
| `cuspHeight()` | Ball mill scallop height |
|
|
358
|
+
| `effectiveDiameter()` | Ball mill effective cutting diameter |
|
|
359
|
+
| `boringBarDeflection()` | Boring bar deflection with L/D guidance |
|
|
360
|
+
| `threadOverWires()` | 3-wire thread measurement |
|
|
361
|
+
| `gaugeBlockStack()` | Gauge block combination (47/88/81-pc sets) |
|
|
362
|
+
| `triangleSolver()` | Triangle solver (SSS/SAS/ASA/SSA) |
|
|
363
|
+
| `cycleTimeEstimator()` | CNC cycle time estimation |
|
|
265
364
|
|
|
266
365
|
## API Examples
|
|
267
366
|
|
|
@@ -271,19 +370,19 @@ import { solveAssignment, calculateUnit } from 'formulab/utility';
|
|
|
271
370
|
import { oee } from 'formulab/quality';
|
|
272
371
|
|
|
273
372
|
const result = oee({
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
373
|
+
rawData: {
|
|
374
|
+
plannedTime: 480, // minutes
|
|
375
|
+
runTime: 420, // actual running time
|
|
376
|
+
totalCount: 1000, // total pieces produced
|
|
377
|
+
goodCount: 990, // good pieces
|
|
378
|
+
idealCycleTime: 0.4, // minutes per piece
|
|
379
|
+
},
|
|
279
380
|
});
|
|
280
381
|
|
|
281
382
|
console.log(result);
|
|
282
383
|
// {
|
|
283
|
-
// oee: 0.
|
|
284
|
-
// availability:
|
|
285
|
-
// performance: 0.952,
|
|
286
|
-
// quality: 0.99,
|
|
384
|
+
// factors: { availability: 0.875, performance: 0.952, quality: 0.99, oee: 0.825 },
|
|
385
|
+
// percentages: { availability: 87.5, performance: 95.2, quality: 99, oee: 82.5 }
|
|
287
386
|
// }
|
|
288
387
|
```
|
|
289
388
|
|
|
@@ -293,22 +392,22 @@ console.log(result);
|
|
|
293
392
|
import { nioshLifting } from 'formulab/safety';
|
|
294
393
|
|
|
295
394
|
const result = nioshLifting({
|
|
296
|
-
loadWeight: 23,
|
|
297
|
-
horizontalDistance: 25,
|
|
298
|
-
|
|
299
|
-
verticalTravel: 25,
|
|
300
|
-
asymmetryAngle: 0,
|
|
301
|
-
|
|
302
|
-
frequency: 1,
|
|
303
|
-
duration: '
|
|
395
|
+
loadWeight: 23, // kg
|
|
396
|
+
horizontalDistance: 25, // cm
|
|
397
|
+
verticalDistance: 75, // cm (height at lift origin)
|
|
398
|
+
verticalTravel: 25, // cm (vertical travel distance)
|
|
399
|
+
asymmetryAngle: 0, // degrees
|
|
400
|
+
coupling: 'good', // 'good' | 'fair' | 'poor'
|
|
401
|
+
frequency: 1, // lifts per minute
|
|
402
|
+
duration: 'short', // 'short' | 'medium' | 'long'
|
|
304
403
|
});
|
|
305
404
|
|
|
306
405
|
console.log(result);
|
|
307
406
|
// {
|
|
308
|
-
// rwl:
|
|
309
|
-
// liftingIndex: 1.
|
|
310
|
-
// riskLevel: '
|
|
311
|
-
//
|
|
407
|
+
// rwl: 21.62, // Recommended Weight Limit (kg)
|
|
408
|
+
// liftingIndex: 1.06, // LI = Load / RWL
|
|
409
|
+
// riskLevel: 'moderate',
|
|
410
|
+
// hm: 1.0, vm: 1.0, dm: 1.0, am: 1.0, fm: 0.94, cm: 1.0
|
|
312
411
|
// }
|
|
313
412
|
```
|
|
314
413
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BrakingDistanceInput, BrakingDistanceResult } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Braking Distance Calculator (AASHTO method)
|
|
4
|
+
*
|
|
5
|
+
* Calculates stopping distance based on:
|
|
6
|
+
* - Reaction distance: d_r = v × t_reaction
|
|
7
|
+
* - Braking distance: d_b = v² / (2 × g × (f ± G))
|
|
8
|
+
* where G = grade/100 (positive uphill, negative downhill)
|
|
9
|
+
*
|
|
10
|
+
* Reference: AASHTO "A Policy on Geometric Design of Highways and Streets"
|
|
11
|
+
*
|
|
12
|
+
* @param input - speed, friction, reaction time, grade
|
|
13
|
+
* @returns stopping distance components
|
|
14
|
+
*/
|
|
15
|
+
export declare function brakingDistance(input: BrakingDistanceInput): BrakingDistanceResult;
|
|
16
|
+
//# sourceMappingURL=brakingDistance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brakingDistance.d.ts","sourceRoot":"","sources":["../../src/automotive/brakingDistance.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,qBAAqB,CAqClF"}
|