formulab 0.1.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 +144 -0
- package/LICENSE +21 -0
- package/README.md +403 -0
- package/dist/automotive/batteryRuntime.d.ts +14 -0
- package/dist/automotive/batteryRuntime.d.ts.map +1 -0
- package/dist/automotive/batteryRuntime.js +38 -0
- package/dist/automotive/batteryRuntime.js.map +1 -0
- package/dist/automotive/evCharging.d.ts +14 -0
- package/dist/automotive/evCharging.d.ts.map +1 -0
- package/dist/automotive/evCharging.js +48 -0
- package/dist/automotive/evCharging.js.map +1 -0
- package/dist/automotive/fuelEconomy.d.ts +15 -0
- package/dist/automotive/fuelEconomy.d.ts.map +1 -0
- package/dist/automotive/fuelEconomy.js +61 -0
- package/dist/automotive/fuelEconomy.js.map +1 -0
- package/dist/automotive/gearRatio.d.ts +15 -0
- package/dist/automotive/gearRatio.d.ts.map +1 -0
- package/dist/automotive/gearRatio.js +39 -0
- package/dist/automotive/gearRatio.js.map +1 -0
- package/dist/automotive/index.d.ts +9 -0
- package/dist/automotive/index.d.ts.map +1 -0
- package/dist/automotive/index.js +9 -0
- package/dist/automotive/index.js.map +1 -0
- package/dist/automotive/power.d.ts +14 -0
- package/dist/automotive/power.d.ts.map +1 -0
- package/dist/automotive/power.js +52 -0
- package/dist/automotive/power.js.map +1 -0
- package/dist/automotive/tireCompare.d.ts +9 -0
- package/dist/automotive/tireCompare.d.ts.map +1 -0
- package/dist/automotive/tireCompare.js +54 -0
- package/dist/automotive/tireCompare.js.map +1 -0
- package/dist/automotive/torque.d.ts +14 -0
- package/dist/automotive/torque.d.ts.map +1 -0
- package/dist/automotive/torque.js +52 -0
- package/dist/automotive/torque.js.map +1 -0
- package/dist/automotive/types.d.ts +114 -0
- package/dist/automotive/types.d.ts.map +1 -0
- package/dist/automotive/types.js +2 -0
- package/dist/automotive/types.js.map +1 -0
- package/dist/chemical/batch.d.ts +12 -0
- package/dist/chemical/batch.d.ts.map +1 -0
- package/dist/chemical/batch.js +36 -0
- package/dist/chemical/batch.js.map +1 -0
- package/dist/chemical/concentration.d.ts +15 -0
- package/dist/chemical/concentration.d.ts.map +1 -0
- package/dist/chemical/concentration.js +45 -0
- package/dist/chemical/concentration.js.map +1 -0
- package/dist/chemical/dilution.d.ts +12 -0
- package/dist/chemical/dilution.d.ts.map +1 -0
- package/dist/chemical/dilution.js +68 -0
- package/dist/chemical/dilution.js.map +1 -0
- package/dist/chemical/index.d.ts +9 -0
- package/dist/chemical/index.d.ts.map +1 -0
- package/dist/chemical/index.js +9 -0
- package/dist/chemical/index.js.map +1 -0
- package/dist/chemical/injectionCycle.d.ts +19 -0
- package/dist/chemical/injectionCycle.d.ts.map +1 -0
- package/dist/chemical/injectionCycle.js +170 -0
- package/dist/chemical/injectionCycle.js.map +1 -0
- package/dist/chemical/ph.d.ts +13 -0
- package/dist/chemical/ph.d.ts.map +1 -0
- package/dist/chemical/ph.js +83 -0
- package/dist/chemical/ph.js.map +1 -0
- package/dist/chemical/reactor.d.ts +19 -0
- package/dist/chemical/reactor.d.ts.map +1 -0
- package/dist/chemical/reactor.js +57 -0
- package/dist/chemical/reactor.js.map +1 -0
- package/dist/chemical/shelfLife.d.ts +15 -0
- package/dist/chemical/shelfLife.d.ts.map +1 -0
- package/dist/chemical/shelfLife.js +36 -0
- package/dist/chemical/shelfLife.js.map +1 -0
- package/dist/chemical/types.d.ts +144 -0
- package/dist/chemical/types.d.ts.map +1 -0
- package/dist/chemical/types.js +2 -0
- package/dist/chemical/types.js.map +1 -0
- package/dist/construction/aggregate.d.ts +33 -0
- package/dist/construction/aggregate.d.ts.map +1 -0
- package/dist/construction/aggregate.js +92 -0
- package/dist/construction/aggregate.js.map +1 -0
- package/dist/construction/beamLoad.d.ts +12 -0
- package/dist/construction/beamLoad.d.ts.map +1 -0
- package/dist/construction/beamLoad.js +156 -0
- package/dist/construction/beamLoad.js.map +1 -0
- package/dist/construction/brick.d.ts +17 -0
- package/dist/construction/brick.d.ts.map +1 -0
- package/dist/construction/brick.js +53 -0
- package/dist/construction/brick.js.map +1 -0
- package/dist/construction/concreteMix.d.ts +9 -0
- package/dist/construction/concreteMix.d.ts.map +1 -0
- package/dist/construction/concreteMix.js +31 -0
- package/dist/construction/concreteMix.js.map +1 -0
- package/dist/construction/earthwork.d.ts +13 -0
- package/dist/construction/earthwork.d.ts.map +1 -0
- package/dist/construction/earthwork.js +25 -0
- package/dist/construction/earthwork.js.map +1 -0
- package/dist/construction/formwork.d.ts +9 -0
- package/dist/construction/formwork.d.ts.map +1 -0
- package/dist/construction/formwork.js +61 -0
- package/dist/construction/formwork.js.map +1 -0
- package/dist/construction/index.d.ts +13 -0
- package/dist/construction/index.d.ts.map +1 -0
- package/dist/construction/index.js +13 -0
- package/dist/construction/index.js.map +1 -0
- package/dist/construction/pert.d.ts +15 -0
- package/dist/construction/pert.d.ts.map +1 -0
- package/dist/construction/pert.js +207 -0
- package/dist/construction/pert.js.map +1 -0
- package/dist/construction/rebar.d.ts +16 -0
- package/dist/construction/rebar.d.ts.map +1 -0
- package/dist/construction/rebar.js +43 -0
- package/dist/construction/rebar.js.map +1 -0
- package/dist/construction/roof.d.ts +16 -0
- package/dist/construction/roof.d.ts.map +1 -0
- package/dist/construction/roof.js +65 -0
- package/dist/construction/roof.js.map +1 -0
- package/dist/construction/slope.d.ts +14 -0
- package/dist/construction/slope.d.ts.map +1 -0
- package/dist/construction/slope.js +54 -0
- package/dist/construction/slope.js.map +1 -0
- package/dist/construction/stair.d.ts +17 -0
- package/dist/construction/stair.d.ts.map +1 -0
- package/dist/construction/stair.js +69 -0
- package/dist/construction/stair.js.map +1 -0
- package/dist/construction/types.d.ts +219 -0
- package/dist/construction/types.d.ts.map +1 -0
- package/dist/construction/types.js +2 -0
- package/dist/construction/types.js.map +1 -0
- package/dist/electronics/awg.d.ts +9 -0
- package/dist/electronics/awg.d.ts.map +1 -0
- package/dist/electronics/awg.js +66 -0
- package/dist/electronics/awg.js.map +1 -0
- package/dist/electronics/capacitor.d.ts +9 -0
- package/dist/electronics/capacitor.d.ts.map +1 -0
- package/dist/electronics/capacitor.js +51 -0
- package/dist/electronics/capacitor.js.map +1 -0
- package/dist/electronics/index.d.ts +12 -0
- package/dist/electronics/index.d.ts.map +1 -0
- package/dist/electronics/index.js +12 -0
- package/dist/electronics/index.js.map +1 -0
- package/dist/electronics/led.d.ts +9 -0
- package/dist/electronics/led.d.ts.map +1 -0
- package/dist/electronics/led.js +72 -0
- package/dist/electronics/led.js.map +1 -0
- package/dist/electronics/reflow.d.ts +12 -0
- package/dist/electronics/reflow.d.ts.map +1 -0
- package/dist/electronics/reflow.js +77 -0
- package/dist/electronics/reflow.js.map +1 -0
- package/dist/electronics/resistor.d.ts +8 -0
- package/dist/electronics/resistor.d.ts.map +1 -0
- package/dist/electronics/resistor.js +137 -0
- package/dist/electronics/resistor.js.map +1 -0
- package/dist/electronics/smt-takt.d.ts +8 -0
- package/dist/electronics/smt-takt.d.ts.map +1 -0
- package/dist/electronics/smt-takt.js +59 -0
- package/dist/electronics/smt-takt.js.map +1 -0
- package/dist/electronics/solder.d.ts +8 -0
- package/dist/electronics/solder.d.ts.map +1 -0
- package/dist/electronics/solder.js +46 -0
- package/dist/electronics/solder.js.map +1 -0
- package/dist/electronics/stencil.d.ts +9 -0
- package/dist/electronics/stencil.d.ts.map +1 -0
- package/dist/electronics/stencil.js +78 -0
- package/dist/electronics/stencil.js.map +1 -0
- package/dist/electronics/trace.d.ts +8 -0
- package/dist/electronics/trace.d.ts.map +1 -0
- package/dist/electronics/trace.js +75 -0
- package/dist/electronics/trace.js.map +1 -0
- package/dist/electronics/types.d.ts +145 -0
- package/dist/electronics/types.d.ts.map +1 -0
- package/dist/electronics/types.js +2 -0
- package/dist/electronics/types.js.map +1 -0
- package/dist/electronics/via.d.ts +12 -0
- package/dist/electronics/via.d.ts.map +1 -0
- package/dist/electronics/via.js +63 -0
- package/dist/electronics/via.js.map +1 -0
- package/dist/energy/carbonFootprint.d.ts +13 -0
- package/dist/energy/carbonFootprint.d.ts.map +1 -0
- package/dist/energy/carbonFootprint.js +41 -0
- package/dist/energy/carbonFootprint.js.map +1 -0
- package/dist/energy/compressedAirCost.d.ts +14 -0
- package/dist/energy/compressedAirCost.d.ts.map +1 -0
- package/dist/energy/compressedAirCost.js +39 -0
- package/dist/energy/compressedAirCost.js.map +1 -0
- package/dist/energy/index.d.ts +8 -0
- package/dist/energy/index.d.ts.map +1 -0
- package/dist/energy/index.js +8 -0
- package/dist/energy/index.js.map +1 -0
- package/dist/energy/motorEfficiency.d.ts +14 -0
- package/dist/energy/motorEfficiency.d.ts.map +1 -0
- package/dist/energy/motorEfficiency.js +47 -0
- package/dist/energy/motorEfficiency.js.map +1 -0
- package/dist/energy/pfCorrection.d.ts +15 -0
- package/dist/energy/pfCorrection.d.ts.map +1 -0
- package/dist/energy/pfCorrection.js +56 -0
- package/dist/energy/pfCorrection.js.map +1 -0
- package/dist/energy/powerCost.d.ts +15 -0
- package/dist/energy/powerCost.d.ts.map +1 -0
- package/dist/energy/powerCost.js +37 -0
- package/dist/energy/powerCost.js.map +1 -0
- package/dist/energy/types.d.ts +119 -0
- package/dist/energy/types.d.ts.map +1 -0
- package/dist/energy/types.js +2 -0
- package/dist/energy/types.js.map +1 -0
- package/dist/energy/vfdSavings.d.ts +16 -0
- package/dist/energy/vfdSavings.d.ts.map +1 -0
- package/dist/energy/vfdSavings.js +57 -0
- package/dist/energy/vfdSavings.js.map +1 -0
- package/dist/food/calorie.d.ts +13 -0
- package/dist/food/calorie.d.ts.map +1 -0
- package/dist/food/calorie.js +42 -0
- package/dist/food/calorie.js.map +1 -0
- package/dist/food/expiry.d.ts +13 -0
- package/dist/food/expiry.d.ts.map +1 -0
- package/dist/food/expiry.js +58 -0
- package/dist/food/expiry.js.map +1 -0
- package/dist/food/haccp.d.ts +18 -0
- package/dist/food/haccp.d.ts.map +1 -0
- package/dist/food/haccp.js +70 -0
- package/dist/food/haccp.js.map +1 -0
- package/dist/food/index.d.ts +6 -0
- package/dist/food/index.d.ts.map +1 -0
- package/dist/food/index.js +6 -0
- package/dist/food/index.js.map +1 -0
- package/dist/food/nutrition.d.ts +12 -0
- package/dist/food/nutrition.d.ts.map +1 -0
- package/dist/food/nutrition.js +75 -0
- package/dist/food/nutrition.js.map +1 -0
- package/dist/food/types.d.ts +104 -0
- package/dist/food/types.d.ts.map +1 -0
- package/dist/food/types.js +2 -0
- package/dist/food/types.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/logistics/cbm.d.ts +12 -0
- package/dist/logistics/cbm.d.ts.map +1 -0
- package/dist/logistics/cbm.js +37 -0
- package/dist/logistics/cbm.js.map +1 -0
- package/dist/logistics/containerFit.d.ts +12 -0
- package/dist/logistics/containerFit.d.ts.map +1 -0
- package/dist/logistics/containerFit.js +73 -0
- package/dist/logistics/containerFit.js.map +1 -0
- package/dist/logistics/dimWeight.d.ts +13 -0
- package/dist/logistics/dimWeight.d.ts.map +1 -0
- package/dist/logistics/dimWeight.js +50 -0
- package/dist/logistics/dimWeight.js.map +1 -0
- package/dist/logistics/eoq.d.ts +18 -0
- package/dist/logistics/eoq.d.ts.map +1 -0
- package/dist/logistics/eoq.js +42 -0
- package/dist/logistics/eoq.js.map +1 -0
- package/dist/logistics/fillRate.d.ts +22 -0
- package/dist/logistics/fillRate.d.ts.map +1 -0
- package/dist/logistics/fillRate.js +84 -0
- package/dist/logistics/fillRate.js.map +1 -0
- package/dist/logistics/freightClass.d.ts +12 -0
- package/dist/logistics/freightClass.d.ts.map +1 -0
- package/dist/logistics/freightClass.js +68 -0
- package/dist/logistics/freightClass.js.map +1 -0
- package/dist/logistics/index.d.ts +15 -0
- package/dist/logistics/index.d.ts.map +1 -0
- package/dist/logistics/index.js +15 -0
- package/dist/logistics/index.js.map +1 -0
- package/dist/logistics/kanban.d.ts +19 -0
- package/dist/logistics/kanban.d.ts.map +1 -0
- package/dist/logistics/kanban.js +48 -0
- package/dist/logistics/kanban.js.map +1 -0
- package/dist/logistics/pallet3d.d.ts +16 -0
- package/dist/logistics/pallet3d.d.ts.map +1 -0
- package/dist/logistics/pallet3d.js +380 -0
- package/dist/logistics/pallet3d.js.map +1 -0
- package/dist/logistics/palletStack.d.ts +12 -0
- package/dist/logistics/palletStack.d.ts.map +1 -0
- package/dist/logistics/palletStack.js +65 -0
- package/dist/logistics/palletStack.js.map +1 -0
- package/dist/logistics/pickTime.d.ts +17 -0
- package/dist/logistics/pickTime.d.ts.map +1 -0
- package/dist/logistics/pickTime.js +70 -0
- package/dist/logistics/pickTime.js.map +1 -0
- package/dist/logistics/safetyStock.d.ts +24 -0
- package/dist/logistics/safetyStock.d.ts.map +1 -0
- package/dist/logistics/safetyStock.js +99 -0
- package/dist/logistics/safetyStock.js.map +1 -0
- package/dist/logistics/shipping.d.ts +16 -0
- package/dist/logistics/shipping.d.ts.map +1 -0
- package/dist/logistics/shipping.js +115 -0
- package/dist/logistics/shipping.js.map +1 -0
- package/dist/logistics/tsp.d.ts +12 -0
- package/dist/logistics/tsp.d.ts.map +1 -0
- package/dist/logistics/tsp.js +166 -0
- package/dist/logistics/tsp.js.map +1 -0
- package/dist/logistics/types.d.ts +315 -0
- package/dist/logistics/types.d.ts.map +1 -0
- package/dist/logistics/types.js +5 -0
- package/dist/logistics/types.js.map +1 -0
- package/dist/metal/bearing.d.ts +11 -0
- package/dist/metal/bearing.d.ts.map +1 -0
- package/dist/metal/bearing.js +32 -0
- package/dist/metal/bearing.js.map +1 -0
- package/dist/metal/bendAllowance.d.ts +13 -0
- package/dist/metal/bendAllowance.d.ts.map +1 -0
- package/dist/metal/bendAllowance.js +75 -0
- package/dist/metal/bendAllowance.js.map +1 -0
- package/dist/metal/bolt.d.ts +32 -0
- package/dist/metal/bolt.d.ts.map +1 -0
- package/dist/metal/bolt.js +149 -0
- package/dist/metal/bolt.js.map +1 -0
- package/dist/metal/cutting.d.ts +10 -0
- package/dist/metal/cutting.d.ts.map +1 -0
- package/dist/metal/cutting.js +55 -0
- package/dist/metal/cutting.js.map +1 -0
- package/dist/metal/cuttingStock.d.ts +8 -0
- package/dist/metal/cuttingStock.d.ts.map +1 -0
- package/dist/metal/cuttingStock.js +89 -0
- package/dist/metal/cuttingStock.js.map +1 -0
- package/dist/metal/flatPattern.d.ts +12 -0
- package/dist/metal/flatPattern.d.ts.map +1 -0
- package/dist/metal/flatPattern.js +50 -0
- package/dist/metal/flatPattern.js.map +1 -0
- package/dist/metal/gear.d.ts +13 -0
- package/dist/metal/gear.d.ts.map +1 -0
- package/dist/metal/gear.js +79 -0
- package/dist/metal/gear.js.map +1 -0
- package/dist/metal/hardness.d.ts +15 -0
- package/dist/metal/hardness.d.ts.map +1 -0
- package/dist/metal/hardness.js +77 -0
- package/dist/metal/hardness.js.map +1 -0
- package/dist/metal/index.d.ts +24 -0
- package/dist/metal/index.d.ts.map +1 -0
- package/dist/metal/index.js +24 -0
- package/dist/metal/index.js.map +1 -0
- package/dist/metal/kFactorReverse.d.ts +19 -0
- package/dist/metal/kFactorReverse.d.ts.map +1 -0
- package/dist/metal/kFactorReverse.js +39 -0
- package/dist/metal/kFactorReverse.js.map +1 -0
- package/dist/metal/material.d.ts +5 -0
- package/dist/metal/material.d.ts.map +1 -0
- package/dist/metal/material.js +56 -0
- package/dist/metal/material.js.map +1 -0
- package/dist/metal/metalWeight.d.ts +10 -0
- package/dist/metal/metalWeight.d.ts.map +1 -0
- package/dist/metal/metalWeight.js +82 -0
- package/dist/metal/metalWeight.js.map +1 -0
- package/dist/metal/pressFit.d.ts +15 -0
- package/dist/metal/pressFit.d.ts.map +1 -0
- package/dist/metal/pressFit.js +96 -0
- package/dist/metal/pressFit.js.map +1 -0
- package/dist/metal/pressTonnage.d.ts +13 -0
- package/dist/metal/pressTonnage.d.ts.map +1 -0
- package/dist/metal/pressTonnage.js +86 -0
- package/dist/metal/pressTonnage.js.map +1 -0
- package/dist/metal/roughness.d.ts +6 -0
- package/dist/metal/roughness.d.ts.map +1 -0
- package/dist/metal/roughness.js +62 -0
- package/dist/metal/roughness.js.map +1 -0
- package/dist/metal/screw.d.ts +7 -0
- package/dist/metal/screw.d.ts.map +1 -0
- package/dist/metal/screw.js +44 -0
- package/dist/metal/screw.js.map +1 -0
- package/dist/metal/spring.d.ts +11 -0
- package/dist/metal/spring.d.ts.map +1 -0
- package/dist/metal/spring.js +59 -0
- package/dist/metal/spring.js.map +1 -0
- package/dist/metal/tap.d.ts +16 -0
- package/dist/metal/tap.d.ts.map +1 -0
- package/dist/metal/tap.js +62 -0
- package/dist/metal/tap.js.map +1 -0
- package/dist/metal/thread.d.ts +8 -0
- package/dist/metal/thread.d.ts.map +1 -0
- package/dist/metal/thread.js +75 -0
- package/dist/metal/thread.js.map +1 -0
- package/dist/metal/tolerance.d.ts +6 -0
- package/dist/metal/tolerance.d.ts.map +1 -0
- package/dist/metal/tolerance.js +113 -0
- package/dist/metal/tolerance.js.map +1 -0
- package/dist/metal/types.d.ts +494 -0
- package/dist/metal/types.d.ts.map +1 -0
- package/dist/metal/types.js +2 -0
- package/dist/metal/types.js.map +1 -0
- package/dist/metal/vibration.d.ts +6 -0
- package/dist/metal/vibration.d.ts.map +1 -0
- package/dist/metal/vibration.js +153 -0
- package/dist/metal/vibration.js.map +1 -0
- package/dist/metal/weldHeat.d.ts +6 -0
- package/dist/metal/weldHeat.d.ts.map +1 -0
- package/dist/metal/weldHeat.js +138 -0
- package/dist/metal/weldHeat.js.map +1 -0
- package/dist/metal/welding.d.ts +6 -0
- package/dist/metal/welding.d.ts.map +1 -0
- package/dist/metal/welding.js +80 -0
- package/dist/metal/welding.js.map +1 -0
- package/dist/quality/aql.d.ts +10 -0
- package/dist/quality/aql.d.ts.map +1 -0
- package/dist/quality/aql.js +104 -0
- package/dist/quality/aql.js.map +1 -0
- package/dist/quality/cpk.d.ts +14 -0
- package/dist/quality/cpk.d.ts.map +1 -0
- package/dist/quality/cpk.js +44 -0
- package/dist/quality/cpk.js.map +1 -0
- package/dist/quality/cycle.d.ts +11 -0
- package/dist/quality/cycle.d.ts.map +1 -0
- package/dist/quality/cycle.js +55 -0
- package/dist/quality/cycle.js.map +1 -0
- package/dist/quality/downtime.d.ts +9 -0
- package/dist/quality/downtime.d.ts.map +1 -0
- package/dist/quality/downtime.js +28 -0
- package/dist/quality/downtime.js.map +1 -0
- package/dist/quality/dpmo.d.ts +10 -0
- package/dist/quality/dpmo.d.ts.map +1 -0
- package/dist/quality/dpmo.js +114 -0
- package/dist/quality/dpmo.js.map +1 -0
- package/dist/quality/index.d.ts +15 -0
- package/dist/quality/index.d.ts.map +1 -0
- package/dist/quality/index.js +15 -0
- package/dist/quality/index.js.map +1 -0
- package/dist/quality/lineBalancing.d.ts +9 -0
- package/dist/quality/lineBalancing.d.ts.map +1 -0
- package/dist/quality/lineBalancing.js +185 -0
- package/dist/quality/lineBalancing.js.map +1 -0
- package/dist/quality/mtbf.d.ts +13 -0
- package/dist/quality/mtbf.d.ts.map +1 -0
- package/dist/quality/mtbf.js +48 -0
- package/dist/quality/mtbf.js.map +1 -0
- package/dist/quality/oee.d.ts +11 -0
- package/dist/quality/oee.d.ts.map +1 -0
- package/dist/quality/oee.js +43 -0
- package/dist/quality/oee.js.map +1 -0
- package/dist/quality/ppk.d.ts +15 -0
- package/dist/quality/ppk.d.ts.map +1 -0
- package/dist/quality/ppk.js +61 -0
- package/dist/quality/ppk.js.map +1 -0
- package/dist/quality/ppm.d.ts +9 -0
- package/dist/quality/ppm.d.ts.map +1 -0
- package/dist/quality/ppm.js +134 -0
- package/dist/quality/ppm.js.map +1 -0
- package/dist/quality/rpn.d.ts +11 -0
- package/dist/quality/rpn.d.ts.map +1 -0
- package/dist/quality/rpn.js +48 -0
- package/dist/quality/rpn.js.map +1 -0
- package/dist/quality/takt.d.ts +13 -0
- package/dist/quality/takt.d.ts.map +1 -0
- package/dist/quality/takt.js +44 -0
- package/dist/quality/takt.js.map +1 -0
- package/dist/quality/types.d.ts +261 -0
- package/dist/quality/types.d.ts.map +1 -0
- package/dist/quality/types.js +2 -0
- package/dist/quality/types.js.map +1 -0
- package/dist/quality/yield.d.ts +12 -0
- package/dist/quality/yield.d.ts.map +1 -0
- package/dist/quality/yield.js +56 -0
- package/dist/quality/yield.js.map +1 -0
- package/dist/safety/fallClearance.d.ts +12 -0
- package/dist/safety/fallClearance.d.ts.map +1 -0
- package/dist/safety/fallClearance.js +37 -0
- package/dist/safety/fallClearance.js.map +1 -0
- package/dist/safety/havsCalculate.d.ts +16 -0
- package/dist/safety/havsCalculate.d.ts.map +1 -0
- package/dist/safety/havsCalculate.js +103 -0
- package/dist/safety/havsCalculate.js.map +1 -0
- package/dist/safety/index.d.ts +8 -0
- package/dist/safety/index.d.ts.map +1 -0
- package/dist/safety/index.js +8 -0
- package/dist/safety/index.js.map +1 -0
- package/dist/safety/nioshLifting.d.ts +21 -0
- package/dist/safety/nioshLifting.d.ts.map +1 -0
- package/dist/safety/nioshLifting.js +164 -0
- package/dist/safety/nioshLifting.js.map +1 -0
- package/dist/safety/noiseExposure.d.ts +22 -0
- package/dist/safety/noiseExposure.d.ts.map +1 -0
- package/dist/safety/noiseExposure.js +76 -0
- package/dist/safety/noiseExposure.js.map +1 -0
- package/dist/safety/respiratorCalculate.d.ts +14 -0
- package/dist/safety/respiratorCalculate.d.ts.map +1 -0
- package/dist/safety/respiratorCalculate.js +90 -0
- package/dist/safety/respiratorCalculate.js.map +1 -0
- package/dist/safety/types.d.ts +93 -0
- package/dist/safety/types.d.ts.map +1 -0
- package/dist/safety/types.js +2 -0
- package/dist/safety/types.js.map +1 -0
- package/dist/safety/wbgtCalculate.d.ts +25 -0
- package/dist/safety/wbgtCalculate.d.ts.map +1 -0
- package/dist/safety/wbgtCalculate.js +65 -0
- package/dist/safety/wbgtCalculate.js.map +1 -0
- package/dist/utility/assignment.d.ts +11 -0
- package/dist/utility/assignment.d.ts.map +1 -0
- package/dist/utility/assignment.js +113 -0
- package/dist/utility/assignment.js.map +1 -0
- package/dist/utility/index.d.ts +4 -0
- package/dist/utility/index.d.ts.map +1 -0
- package/dist/utility/index.js +4 -0
- package/dist/utility/index.js.map +1 -0
- package/dist/utility/qrcode.d.ts +30 -0
- package/dist/utility/qrcode.d.ts.map +1 -0
- package/dist/utility/qrcode.js +30 -0
- package/dist/utility/qrcode.js.map +1 -0
- package/dist/utility/types.d.ts +64 -0
- package/dist/utility/types.d.ts.map +1 -0
- package/dist/utility/types.js +2 -0
- package/dist/utility/types.js.map +1 -0
- package/dist/utility/unit.d.ts +25 -0
- package/dist/utility/unit.d.ts.map +1 -0
- package/dist/utility/unit.js +136 -0
- package/dist/utility/unit.js.map +1 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +12 -0
- package/dist/utils.js.map +1 -0
- package/package.json +117 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2025-02-05
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
Initial release with 103 calculation functions across 11 domains.
|
|
13
|
+
|
|
14
|
+
#### Quality & Production (13 functions)
|
|
15
|
+
- `oee()` - Overall Equipment Effectiveness calculation
|
|
16
|
+
- `cpk()` - Process Capability Index
|
|
17
|
+
- `cycleTime()` - Cycle Time analysis
|
|
18
|
+
- `taktTime()` - Takt Time calculation
|
|
19
|
+
- `aql()` - AQL sampling inspection (ISO 2859-1)
|
|
20
|
+
- `downtime()` - Downtime analysis
|
|
21
|
+
- `dpmo()` - Defects Per Million Opportunities
|
|
22
|
+
- `lineBalancing()` - Line balancing optimization
|
|
23
|
+
- `mtbf()` - Mean Time Between Failures
|
|
24
|
+
- `ppk()` - Process Performance Index
|
|
25
|
+
- `ppm()` - Parts Per Million conversion
|
|
26
|
+
- `rpn()` - Risk Priority Number (FMEA)
|
|
27
|
+
- `yieldCalc()` - First Pass Yield / RTY
|
|
28
|
+
|
|
29
|
+
#### Metal & Machining (22 functions)
|
|
30
|
+
- `metalWeight()` - Weight calculation for various shapes
|
|
31
|
+
- `bendAllowance()` - Sheet metal bend allowance
|
|
32
|
+
- `flatPattern()` - Flat pattern length calculation
|
|
33
|
+
- `kFactorReverse()` - K-factor reverse engineering
|
|
34
|
+
- `pressTonnage()` - Press brake tonnage
|
|
35
|
+
- `bearing()` - L10 bearing life calculation
|
|
36
|
+
- `bolt()` - Bolt torque and preload
|
|
37
|
+
- `cutting()` - Cutting speed, feed rate, RPM
|
|
38
|
+
- `cuttingStock()` - 1D cutting optimization
|
|
39
|
+
- `gear()` - Gear module calculation
|
|
40
|
+
- `hardness()` - Hardness conversion (HRC, HB, HV)
|
|
41
|
+
- `material()` - Material properties lookup
|
|
42
|
+
- `pressFit()` - Press fit interference
|
|
43
|
+
- `roughness()` - Surface roughness conversion
|
|
44
|
+
- `screw()` - Screw specification
|
|
45
|
+
- `spring()` - Spring design calculation
|
|
46
|
+
- `tap()` - Tap drill size
|
|
47
|
+
- `thread()` - Thread dimensions
|
|
48
|
+
- `tolerance()` - ISO tolerance (IT grades)
|
|
49
|
+
- `vibration()` - Natural frequency analysis
|
|
50
|
+
- `weldHeat()` - Weld heat input calculation
|
|
51
|
+
- `welding()` - Welding parameters
|
|
52
|
+
|
|
53
|
+
#### Chemical & Process (7 functions)
|
|
54
|
+
- `batch()` - Batch scaling calculation
|
|
55
|
+
- `concentration()` - Concentration unit conversion
|
|
56
|
+
- `dilution()` - Dilution calculation (C1V1 = C2V2)
|
|
57
|
+
- `ph()` - pH and buffer calculations
|
|
58
|
+
- `reactor()` - Reactor sizing
|
|
59
|
+
- `shelfLife()` - Shelf life prediction (Arrhenius)
|
|
60
|
+
- `injectionCycle()` - Injection molding cycle time
|
|
61
|
+
|
|
62
|
+
#### Electronics & SMT (10 functions)
|
|
63
|
+
- `reflowProfile()` - Reflow temperature profile
|
|
64
|
+
- `resistorDecode()` - Resistor color code decoder
|
|
65
|
+
- `smtTakt()` - SMT line takt time
|
|
66
|
+
- `solderPaste()` - Solder paste volume calculation
|
|
67
|
+
- `traceWidth()` - PCB trace width (IPC-2221)
|
|
68
|
+
- `awgProperties()` - AWG wire properties
|
|
69
|
+
- `capacitorDecode()` - Capacitor code decoder
|
|
70
|
+
- `ledResistor()` - LED resistor calculation
|
|
71
|
+
- `stencilAperture()` - Stencil aperture design
|
|
72
|
+
- `viaCurrent()` - Via current capacity
|
|
73
|
+
|
|
74
|
+
#### Construction (11 functions)
|
|
75
|
+
- `beamLoad()` - Beam load calculation
|
|
76
|
+
- `concreteMix()` - Concrete mix ratio
|
|
77
|
+
- `earthwork()` - Earthwork volume
|
|
78
|
+
- `formwork()` - Formwork area calculation
|
|
79
|
+
- `rebarWeight()` - Rebar weight by size
|
|
80
|
+
- `slope()` - Slope conversion (%, degree, ratio)
|
|
81
|
+
- `aggregate()` - Aggregate volume calculation
|
|
82
|
+
- `brick()` - Brick quantity estimation
|
|
83
|
+
- `pert()` - PERT schedule analysis
|
|
84
|
+
- `roof()` - Roof calculation
|
|
85
|
+
- `stair()` - Stair dimension calculation
|
|
86
|
+
|
|
87
|
+
#### Automotive (7 functions)
|
|
88
|
+
- `batteryRuntime()` - Battery capacity/runtime
|
|
89
|
+
- `evCharging()` - EV charging time estimation
|
|
90
|
+
- `fuelEconomy()` - Fuel economy conversion
|
|
91
|
+
- `gearRatio()` - Gear ratio calculation
|
|
92
|
+
- `tireCompare()` - Tire size comparison
|
|
93
|
+
- `torque()` - Torque conversion
|
|
94
|
+
- `power()` - Power conversion (HP, kW)
|
|
95
|
+
|
|
96
|
+
#### Logistics & Inventory (14 functions)
|
|
97
|
+
- `cbm()` - Cubic meter calculation
|
|
98
|
+
- `containerFit()` - Container capacity estimation
|
|
99
|
+
- `dimWeight()` - Dimensional weight
|
|
100
|
+
- `eoq()` - Economic Order Quantity
|
|
101
|
+
- `fillRate()` - Fill rate calculation
|
|
102
|
+
- `freightClass()` - NMFC freight class
|
|
103
|
+
- `kanban()` - Kanban quantity
|
|
104
|
+
- `pallet3d()` - 3D pallet optimization
|
|
105
|
+
- `palletStack()` - Pallet stacking calculation
|
|
106
|
+
- `pickTime()` - Picking time estimation
|
|
107
|
+
- `safetyStock()` - Safety stock calculation
|
|
108
|
+
- `serviceLevel()` - Service level calculation
|
|
109
|
+
- `shipping()` - Shipping cost estimation
|
|
110
|
+
- `tsp()` - Traveling salesman problem
|
|
111
|
+
|
|
112
|
+
#### Energy & Utilities (6 functions)
|
|
113
|
+
- `carbonFootprint()` - Scope 2 emissions
|
|
114
|
+
- `compressedAirCost()` - Compressed air cost
|
|
115
|
+
- `motorEfficiency()` - Motor upgrade ROI
|
|
116
|
+
- `pfCorrection()` - Power factor correction
|
|
117
|
+
- `powerCost()` - Electricity cost with demand
|
|
118
|
+
- `vfdSavings()` - VFD energy savings
|
|
119
|
+
|
|
120
|
+
#### Safety & Ergonomics (6 functions)
|
|
121
|
+
- `fallClearance()` - Fall protection clearance
|
|
122
|
+
- `nioshLifting()` - NIOSH lifting equation (1991 revised)
|
|
123
|
+
- `noiseExposure()` - TWA/Dose calculation (OSHA)
|
|
124
|
+
- `wbgtCalculate()` - WBGT heat stress index
|
|
125
|
+
- `havsCalculate()` - Hand-arm vibration exposure
|
|
126
|
+
- `respiratorCalculate()` - Respirator MUC calculation
|
|
127
|
+
|
|
128
|
+
#### Food & HACCP (4 functions)
|
|
129
|
+
- `calorie()` - Calorie requirement (BMR/TDEE)
|
|
130
|
+
- `expiry()` - Expiry date calculation
|
|
131
|
+
- `nutrition()` - Nutrition facts calculation
|
|
132
|
+
- `haccp()` - HACCP checklist generation
|
|
133
|
+
|
|
134
|
+
#### Utility (3 functions)
|
|
135
|
+
- `solveAssignment()` - Hungarian algorithm optimization
|
|
136
|
+
- `calculateUnit()` - Unit conversion
|
|
137
|
+
- `getCategories()` - Get unit categories
|
|
138
|
+
|
|
139
|
+
### Technical Features
|
|
140
|
+
- Zero dependencies
|
|
141
|
+
- Full TypeScript support with detailed type definitions
|
|
142
|
+
- Tree-shakeable ESM exports
|
|
143
|
+
- Subpath exports for each domain (`formulab/quality`, `formulab/metal`, etc.)
|
|
144
|
+
- Node.js 18+ support
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 iyulab
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
# formulab
|
|
2
|
+
|
|
3
|
+
> Industrial & manufacturing calculation library for engineers
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/formulab)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://www.typescriptlang.org/)
|
|
8
|
+
|
|
9
|
+
A comprehensive collection of engineering formulas and calculations for manufacturing, quality control, logistics, and industrial applications. Zero dependencies, fully typed, tree-shakeable.
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **100+ industrial calculations** — OEE, Cpk, metal weight, CBM, NIOSH lifting, and more
|
|
14
|
+
- **11 specialized domains** — Quality, Metal, Chemical, Electronics, Construction, Automotive, Logistics, Energy, Safety, Food, Utility
|
|
15
|
+
- **Zero dependencies** — Lightweight and fast
|
|
16
|
+
- **TypeScript first** — Full type definitions included
|
|
17
|
+
- **Tree-shakeable** — Import only what you need
|
|
18
|
+
- **Well tested** — Comprehensive test coverage
|
|
19
|
+
- **Research-based** — Built on industry standards (ISO, OSHA, NIOSH, IPC)
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install formulab
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm add formulab
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { oee, metalWeight, cbm } from 'formulab';
|
|
35
|
+
|
|
36
|
+
// Calculate OEE (Overall Equipment Effectiveness)
|
|
37
|
+
const result = oee({
|
|
38
|
+
availability: 0.90,
|
|
39
|
+
performance: 0.95,
|
|
40
|
+
quality: 0.99
|
|
41
|
+
});
|
|
42
|
+
console.log(result.oee); // 0.846 (84.6%)
|
|
43
|
+
|
|
44
|
+
// Calculate metal weight
|
|
45
|
+
const weight = metalWeight({
|
|
46
|
+
material: 'steel',
|
|
47
|
+
shape: 'plate',
|
|
48
|
+
dimensions: { length: 1000, width: 500, thickness: 10 },
|
|
49
|
+
});
|
|
50
|
+
console.log(weight.weight); // 39.25 kg
|
|
51
|
+
|
|
52
|
+
// Calculate CBM
|
|
53
|
+
const volume = cbm({
|
|
54
|
+
length: 120,
|
|
55
|
+
width: 80,
|
|
56
|
+
height: 100,
|
|
57
|
+
unit: 'cm'
|
|
58
|
+
});
|
|
59
|
+
console.log(volume.cbm); // 0.96 m³
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Domains
|
|
63
|
+
|
|
64
|
+
### Quality & Production (13 functions)
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { oee, cpk, taktTime, dpmo } from 'formulab/quality';
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
| Function | Description |
|
|
71
|
+
|----------|-------------|
|
|
72
|
+
| `oee()` | Overall Equipment Effectiveness |
|
|
73
|
+
| `cpk()` | Process Capability Index |
|
|
74
|
+
| `cycleTime()` | Cycle Time analysis |
|
|
75
|
+
| `taktTime()` | Takt Time calculation |
|
|
76
|
+
| `aql()` | AQL sampling inspection |
|
|
77
|
+
| `downtime()` | Downtime analysis |
|
|
78
|
+
| `dpmo()` | Defects Per Million Opportunities |
|
|
79
|
+
| `lineBalancing()` | Line balancing optimization |
|
|
80
|
+
| `mtbf()` | Mean Time Between Failures |
|
|
81
|
+
| `ppk()` | Process Performance Index |
|
|
82
|
+
| `ppm()` | Parts Per Million conversion |
|
|
83
|
+
| `rpn()` | Risk Priority Number (FMEA) |
|
|
84
|
+
| `yieldCalc()` | First Pass Yield / RTY |
|
|
85
|
+
|
|
86
|
+
### Metal & Machining (22 functions)
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import { metalWeight, bendAllowance, cutting, bearing } from 'formulab/metal';
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
| Function | Description |
|
|
93
|
+
|----------|-------------|
|
|
94
|
+
| `metalWeight()` | Weight calculation for various shapes |
|
|
95
|
+
| `bendAllowance()` | Sheet metal bend allowance |
|
|
96
|
+
| `flatPattern()` | Flat pattern length calculation |
|
|
97
|
+
| `kFactorReverse()` | K-factor reverse engineering |
|
|
98
|
+
| `pressTonnage()` | Press brake tonnage |
|
|
99
|
+
| `bearing()` | L10 bearing life calculation |
|
|
100
|
+
| `bolt()` | Bolt torque and preload |
|
|
101
|
+
| `cutting()` | Cutting speed, feed rate, RPM |
|
|
102
|
+
| `cuttingStock()` | 1D cutting optimization |
|
|
103
|
+
| `gear()` | Gear module calculation |
|
|
104
|
+
| `hardness()` | Hardness conversion (HRC, HB, HV) |
|
|
105
|
+
| `material()` | Material properties lookup |
|
|
106
|
+
| `pressFit()` | Press fit interference |
|
|
107
|
+
| `roughness()` | Surface roughness conversion |
|
|
108
|
+
| `screw()` | Screw specification |
|
|
109
|
+
| `spring()` | Spring design calculation |
|
|
110
|
+
| `tap()` | Tap drill size |
|
|
111
|
+
| `thread()` | Thread dimensions |
|
|
112
|
+
| `tolerance()` | ISO tolerance (IT grades) |
|
|
113
|
+
| `vibration()` | Natural frequency analysis |
|
|
114
|
+
| `weldHeat()` | Weld heat input calculation |
|
|
115
|
+
| `welding()` | Welding parameters |
|
|
116
|
+
|
|
117
|
+
### Chemical & Process (7 functions)
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
import { dilution, concentration, ph, reactor } from 'formulab/chemical';
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
| Function | Description |
|
|
124
|
+
|----------|-------------|
|
|
125
|
+
| `batch()` | Batch scaling calculation |
|
|
126
|
+
| `concentration()` | Concentration conversion |
|
|
127
|
+
| `dilution()` | Dilution (C1V1 = C2V2) |
|
|
128
|
+
| `ph()` | pH and buffer calculations |
|
|
129
|
+
| `reactor()` | Reactor sizing |
|
|
130
|
+
| `shelfLife()` | Shelf life prediction (Arrhenius) |
|
|
131
|
+
| `injectionCycle()` | Injection molding cycle time |
|
|
132
|
+
|
|
133
|
+
### Electronics & SMT (10 functions)
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
import { traceWidth, solderPaste, resistorDecode } from 'formulab/electronics';
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
| Function | Description |
|
|
140
|
+
|----------|-------------|
|
|
141
|
+
| `reflowProfile()` | Reflow temperature profile |
|
|
142
|
+
| `resistorDecode()` | Resistor color code decoder |
|
|
143
|
+
| `smtTakt()` | SMT line takt time |
|
|
144
|
+
| `solderPaste()` | Solder paste volume calculation |
|
|
145
|
+
| `traceWidth()` | PCB trace width (IPC-2221) |
|
|
146
|
+
| `awgProperties()` | AWG wire properties |
|
|
147
|
+
| `capacitorDecode()` | Capacitor code decoder |
|
|
148
|
+
| `ledResistor()` | LED resistor calculation |
|
|
149
|
+
| `stencilAperture()` | Stencil aperture design |
|
|
150
|
+
| `viaCurrent()` | Via current capacity |
|
|
151
|
+
|
|
152
|
+
### Construction (11 functions)
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
import { concreteMix, rebarWeight, slope, stair } from 'formulab/construction';
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
| Function | Description |
|
|
159
|
+
|----------|-------------|
|
|
160
|
+
| `beamLoad()` | Beam load calculation |
|
|
161
|
+
| `concreteMix()` | Concrete mix ratio |
|
|
162
|
+
| `earthwork()` | Earthwork volume |
|
|
163
|
+
| `formwork()` | Formwork area calculation |
|
|
164
|
+
| `rebarWeight()` | Rebar weight by size |
|
|
165
|
+
| `slope()` | Slope conversion (%, degree, ratio) |
|
|
166
|
+
| `aggregate()` | Aggregate volume calculation |
|
|
167
|
+
| `brick()` | Brick quantity estimation |
|
|
168
|
+
| `pert()` | PERT schedule analysis |
|
|
169
|
+
| `roof()` | Roof calculation |
|
|
170
|
+
| `stair()` | Stair dimension calculation |
|
|
171
|
+
|
|
172
|
+
### Automotive (7 functions)
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
import { batteryRuntime, evCharging, torque } from 'formulab/automotive';
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
| Function | Description |
|
|
179
|
+
|----------|-------------|
|
|
180
|
+
| `batteryRuntime()` | Battery capacity/runtime |
|
|
181
|
+
| `evCharging()` | EV charging time estimation |
|
|
182
|
+
| `fuelEconomy()` | Fuel economy conversion |
|
|
183
|
+
| `gearRatio()` | Gear ratio calculation |
|
|
184
|
+
| `tireCompare()` | Tire size comparison |
|
|
185
|
+
| `torque()` | Torque conversion |
|
|
186
|
+
| `power()` | Power conversion (HP, kW) |
|
|
187
|
+
|
|
188
|
+
### Logistics & Inventory (14 functions)
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
import { cbm, eoq, safetyStock, kanban } from 'formulab/logistics';
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
| Function | Description |
|
|
195
|
+
|----------|-------------|
|
|
196
|
+
| `cbm()` | Cubic meter calculation |
|
|
197
|
+
| `containerFit()` | Container capacity estimation |
|
|
198
|
+
| `dimWeight()` | Dimensional weight |
|
|
199
|
+
| `eoq()` | Economic Order Quantity |
|
|
200
|
+
| `fillRate()` | Fill rate calculation |
|
|
201
|
+
| `freightClass()` | NMFC freight class |
|
|
202
|
+
| `kanban()` | Kanban quantity |
|
|
203
|
+
| `pallet3d()` | 3D pallet optimization |
|
|
204
|
+
| `palletStack()` | Pallet stacking calculation |
|
|
205
|
+
| `pickTime()` | Picking time estimation |
|
|
206
|
+
| `safetyStock()` | Safety stock calculation |
|
|
207
|
+
| `serviceLevel()` | Service level calculation |
|
|
208
|
+
| `shipping()` | Shipping cost estimation |
|
|
209
|
+
| `tsp()` | Traveling salesman problem |
|
|
210
|
+
|
|
211
|
+
### Energy & Utilities (6 functions)
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
import { powerCost, motorEfficiency, carbonFootprint } from 'formulab/energy';
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
| Function | Description |
|
|
218
|
+
|----------|-------------|
|
|
219
|
+
| `carbonFootprint()` | Scope 2 emissions |
|
|
220
|
+
| `compressedAirCost()` | Compressed air cost |
|
|
221
|
+
| `motorEfficiency()` | Motor upgrade ROI |
|
|
222
|
+
| `pfCorrection()` | Power factor correction |
|
|
223
|
+
| `powerCost()` | Electricity cost with demand |
|
|
224
|
+
| `vfdSavings()` | VFD energy savings |
|
|
225
|
+
|
|
226
|
+
### Safety & Ergonomics (6 functions)
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
import { nioshLifting, noiseExposure, wbgtCalculate } from 'formulab/safety';
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
| Function | Description |
|
|
233
|
+
|----------|-------------|
|
|
234
|
+
| `fallClearance()` | Fall protection clearance |
|
|
235
|
+
| `nioshLifting()` | NIOSH lifting equation |
|
|
236
|
+
| `noiseExposure()` | TWA/Dose calculation |
|
|
237
|
+
| `wbgtCalculate()` | WBGT heat stress index |
|
|
238
|
+
| `havsCalculate()` | Hand-arm vibration exposure |
|
|
239
|
+
| `respiratorCalculate()` | Respirator MUC calculation |
|
|
240
|
+
|
|
241
|
+
### Food & HACCP (4 functions)
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
import { calorie, nutrition, haccp } from 'formulab/food';
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
| Function | Description |
|
|
248
|
+
|----------|-------------|
|
|
249
|
+
| `calorie()` | Calorie requirement (BMR/TDEE) |
|
|
250
|
+
| `expiry()` | Expiry date calculation |
|
|
251
|
+
| `nutrition()` | Nutrition facts calculation |
|
|
252
|
+
| `haccp()` | HACCP checklist generation |
|
|
253
|
+
|
|
254
|
+
### Utility (3 functions)
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
import { solveAssignment, calculateUnit } from 'formulab/utility';
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
| Function | Description |
|
|
261
|
+
|----------|-------------|
|
|
262
|
+
| `solveAssignment()` | Hungarian algorithm optimization |
|
|
263
|
+
| `calculateUnit()` | Unit conversion |
|
|
264
|
+
| `getCategories()` | Get unit categories |
|
|
265
|
+
|
|
266
|
+
## API Examples
|
|
267
|
+
|
|
268
|
+
### OEE Calculation
|
|
269
|
+
|
|
270
|
+
```typescript
|
|
271
|
+
import { oee } from 'formulab/quality';
|
|
272
|
+
|
|
273
|
+
const result = oee({
|
|
274
|
+
plannedTime: 480, // minutes
|
|
275
|
+
operatingTime: 420,
|
|
276
|
+
totalPieces: 1000,
|
|
277
|
+
goodPieces: 990,
|
|
278
|
+
idealCycleTime: 0.5,
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
console.log(result);
|
|
282
|
+
// {
|
|
283
|
+
// oee: 0.846,
|
|
284
|
+
// availability: 0.875,
|
|
285
|
+
// performance: 0.952,
|
|
286
|
+
// quality: 0.99,
|
|
287
|
+
// }
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### NIOSH Lifting Equation
|
|
291
|
+
|
|
292
|
+
```typescript
|
|
293
|
+
import { nioshLifting } from 'formulab/safety';
|
|
294
|
+
|
|
295
|
+
const result = nioshLifting({
|
|
296
|
+
loadWeight: 23,
|
|
297
|
+
horizontalDistance: 25,
|
|
298
|
+
verticalLocation: 75,
|
|
299
|
+
verticalTravel: 25,
|
|
300
|
+
asymmetryAngle: 0,
|
|
301
|
+
couplingQuality: 'good',
|
|
302
|
+
frequency: 1,
|
|
303
|
+
duration: 'moderate',
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
console.log(result);
|
|
307
|
+
// {
|
|
308
|
+
// rwl: 23.0, // Recommended Weight Limit (kg)
|
|
309
|
+
// liftingIndex: 1.0, // LI = Load / RWL
|
|
310
|
+
// riskLevel: 'low',
|
|
311
|
+
// multipliers: { hm: 1.0, vm: 1.0, dm: 0.93, am: 1.0, fm: 0.94, cm: 1.0 }
|
|
312
|
+
// }
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Dimensional Weight
|
|
316
|
+
|
|
317
|
+
```typescript
|
|
318
|
+
import { dimWeight } from 'formulab/logistics';
|
|
319
|
+
|
|
320
|
+
const result = dimWeight({
|
|
321
|
+
length: 60,
|
|
322
|
+
width: 40,
|
|
323
|
+
height: 30,
|
|
324
|
+
unit: 'cm',
|
|
325
|
+
carrier: 'international',
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
console.log(result);
|
|
329
|
+
// {
|
|
330
|
+
// dimWeight: 14.4,
|
|
331
|
+
// actualVolume: 0.072,
|
|
332
|
+
// cbm: 0.072,
|
|
333
|
+
// }
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
## Tree Shaking
|
|
337
|
+
|
|
338
|
+
Import only what you need to minimize bundle size:
|
|
339
|
+
|
|
340
|
+
```typescript
|
|
341
|
+
// Recommended - domain-specific import
|
|
342
|
+
import { oee } from 'formulab/quality';
|
|
343
|
+
import { metalWeight } from 'formulab/metal';
|
|
344
|
+
|
|
345
|
+
// Also works - main entry point (tree-shakeable)
|
|
346
|
+
import { oee, metalWeight } from 'formulab';
|
|
347
|
+
|
|
348
|
+
// Avoid - imports entire module
|
|
349
|
+
import * as formulab from 'formulab';
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
## TypeScript Support
|
|
353
|
+
|
|
354
|
+
Full TypeScript support with detailed type definitions:
|
|
355
|
+
|
|
356
|
+
```typescript
|
|
357
|
+
import type {
|
|
358
|
+
OeeInput,
|
|
359
|
+
OeeResult,
|
|
360
|
+
CpkInput,
|
|
361
|
+
CpkResult,
|
|
362
|
+
MetalWeightInput,
|
|
363
|
+
MetalWeightResult,
|
|
364
|
+
} from 'formulab';
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
## Browser Support
|
|
368
|
+
|
|
369
|
+
formulab works in all modern browsers and Node.js:
|
|
370
|
+
|
|
371
|
+
- Node.js 18+
|
|
372
|
+
- Chrome 80+
|
|
373
|
+
- Firefox 75+
|
|
374
|
+
- Safari 13+
|
|
375
|
+
- Edge 80+
|
|
376
|
+
|
|
377
|
+
## Contributing
|
|
378
|
+
|
|
379
|
+
Contributions are welcome! Please see our [GitHub repository](https://github.com/iyulab/formulab).
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
# Clone the repository
|
|
383
|
+
git clone https://github.com/iyulab/formulab.git
|
|
384
|
+
|
|
385
|
+
# Install dependencies
|
|
386
|
+
pnpm install
|
|
387
|
+
|
|
388
|
+
# Run tests
|
|
389
|
+
pnpm test
|
|
390
|
+
|
|
391
|
+
# Build
|
|
392
|
+
pnpm build
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
## License
|
|
396
|
+
|
|
397
|
+
MIT © [iyulab](https://github.com/iyulab)
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
<p align="center">
|
|
402
|
+
Made with engineering precision by <a href="https://github.com/iyulab">iyulab</a>
|
|
403
|
+
</p>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BatteryInput, BatteryResult } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Calculate battery runtime based on capacity, voltage, and load
|
|
4
|
+
*
|
|
5
|
+
* Formula:
|
|
6
|
+
* - Energy (Wh) = Capacity (Ah) x Voltage (V)
|
|
7
|
+
* - Runtime (h) = Energy (Wh) x Efficiency / Load (W)
|
|
8
|
+
* - Current Draw (A) = Load (W) / Voltage (V)
|
|
9
|
+
*
|
|
10
|
+
* @param input - Battery parameters
|
|
11
|
+
* @returns Battery result with energy and runtime
|
|
12
|
+
*/
|
|
13
|
+
export declare function batteryRuntime(input: BatteryInput): BatteryResult;
|
|
14
|
+
//# sourceMappingURL=batteryRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batteryRuntime.d.ts","sourceRoot":"","sources":["../../src/automotive/batteryRuntime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE9D;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,aAAa,CA2BjE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { roundTo } from '../utils.js';
|
|
2
|
+
/**
|
|
3
|
+
* Calculate battery runtime based on capacity, voltage, and load
|
|
4
|
+
*
|
|
5
|
+
* Formula:
|
|
6
|
+
* - Energy (Wh) = Capacity (Ah) x Voltage (V)
|
|
7
|
+
* - Runtime (h) = Energy (Wh) x Efficiency / Load (W)
|
|
8
|
+
* - Current Draw (A) = Load (W) / Voltage (V)
|
|
9
|
+
*
|
|
10
|
+
* @param input - Battery parameters
|
|
11
|
+
* @returns Battery result with energy and runtime
|
|
12
|
+
*/
|
|
13
|
+
export function batteryRuntime(input) {
|
|
14
|
+
const { capacityAh, voltageV, loadW, efficiency } = input;
|
|
15
|
+
// Handle edge cases
|
|
16
|
+
if (voltageV <= 0 || loadW <= 0) {
|
|
17
|
+
return {
|
|
18
|
+
energyWh: voltageV > 0 ? roundTo(capacityAh * voltageV, 2) : 0,
|
|
19
|
+
energyKwh: voltageV > 0 ? roundTo((capacityAh * voltageV) / 1000, 2) : 0,
|
|
20
|
+
runtimeHours: 0,
|
|
21
|
+
runtimeMinutes: 0,
|
|
22
|
+
currentDraw: 0,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const energyWh = capacityAh * voltageV;
|
|
26
|
+
const energyKwh = energyWh / 1000;
|
|
27
|
+
const runtimeHours = (energyWh * efficiency) / loadW;
|
|
28
|
+
const runtimeMinutes = runtimeHours * 60;
|
|
29
|
+
const currentDraw = loadW / voltageV;
|
|
30
|
+
return {
|
|
31
|
+
energyWh: roundTo(energyWh, 2),
|
|
32
|
+
energyKwh: roundTo(energyKwh, 2),
|
|
33
|
+
runtimeHours: roundTo(runtimeHours, 2),
|
|
34
|
+
runtimeMinutes: roundTo(runtimeMinutes, 2),
|
|
35
|
+
currentDraw: roundTo(currentDraw, 2),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=batteryRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batteryRuntime.js","sourceRoot":"","sources":["../../src/automotive/batteryRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,KAAmB;IAChD,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAE1D,oBAAoB;IACpB,IAAI,QAAQ,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QAChC,OAAO;YACL,QAAQ,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9D,SAAS,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,GAAG,QAAQ,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxE,YAAY,EAAE,CAAC;YACf,cAAc,EAAE,CAAC;YACjB,WAAW,EAAE,CAAC;SACf,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;IACvC,MAAM,SAAS,GAAG,QAAQ,GAAG,IAAI,CAAC;IAClC,MAAM,YAAY,GAAG,CAAC,QAAQ,GAAG,UAAU,CAAC,GAAG,KAAK,CAAC;IACrD,MAAM,cAAc,GAAG,YAAY,GAAG,EAAE,CAAC;IACzC,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,CAAC;IAErC,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC9B,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;QAChC,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;QACtC,cAAc,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;QAC1C,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;KACrC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ChargingInput, ChargingResult } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Calculate EV charging time and energy requirements
|
|
4
|
+
*
|
|
5
|
+
* Formula:
|
|
6
|
+
* - Energy Needed (kWh) = Battery Capacity x (SOC End - SOC Start) / 100
|
|
7
|
+
* - Energy From Grid (kWh) = Energy Needed / Efficiency
|
|
8
|
+
* - Charging Time (h) = Energy From Grid / Charger Power
|
|
9
|
+
*
|
|
10
|
+
* @param input - Charging parameters
|
|
11
|
+
* @returns Charging result with energy and time
|
|
12
|
+
*/
|
|
13
|
+
export declare function evCharging(input: ChargingInput): ChargingResult;
|
|
14
|
+
//# sourceMappingURL=evCharging.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evCharging.d.ts","sourceRoot":"","sources":["../../src/automotive/evCharging.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,aAAa,GAAG,cAAc,CAuC/D"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { roundTo } from '../utils.js';
|
|
2
|
+
/**
|
|
3
|
+
* Calculate EV charging time and energy requirements
|
|
4
|
+
*
|
|
5
|
+
* Formula:
|
|
6
|
+
* - Energy Needed (kWh) = Battery Capacity x (SOC End - SOC Start) / 100
|
|
7
|
+
* - Energy From Grid (kWh) = Energy Needed / Efficiency
|
|
8
|
+
* - Charging Time (h) = Energy From Grid / Charger Power
|
|
9
|
+
*
|
|
10
|
+
* @param input - Charging parameters
|
|
11
|
+
* @returns Charging result with energy and time
|
|
12
|
+
*/
|
|
13
|
+
export function evCharging(input) {
|
|
14
|
+
const { batteryCapacityKwh, chargerPowerKw, socStartPercent, socEndPercent, efficiency } = input;
|
|
15
|
+
// Handle edge cases - no charging needed or invalid
|
|
16
|
+
if (socEndPercent <= socStartPercent) {
|
|
17
|
+
return {
|
|
18
|
+
energyNeeded: 0,
|
|
19
|
+
energyFromGrid: 0,
|
|
20
|
+
chargingTimeHours: 0,
|
|
21
|
+
chargingTimeMinutes: 0,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
// Handle zero charger power
|
|
25
|
+
if (chargerPowerKw <= 0) {
|
|
26
|
+
const socDiff = (socEndPercent - socStartPercent) / 100;
|
|
27
|
+
const energyNeeded = batteryCapacityKwh * socDiff;
|
|
28
|
+
const energyFromGrid = energyNeeded / efficiency;
|
|
29
|
+
return {
|
|
30
|
+
energyNeeded: roundTo(energyNeeded, 2),
|
|
31
|
+
energyFromGrid: roundTo(energyFromGrid, 2),
|
|
32
|
+
chargingTimeHours: 0,
|
|
33
|
+
chargingTimeMinutes: 0,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const socDiff = (socEndPercent - socStartPercent) / 100;
|
|
37
|
+
const energyNeeded = batteryCapacityKwh * socDiff;
|
|
38
|
+
const energyFromGrid = energyNeeded / efficiency;
|
|
39
|
+
const chargingTimeHours = energyFromGrid / chargerPowerKw;
|
|
40
|
+
const chargingTimeMinutes = chargingTimeHours * 60;
|
|
41
|
+
return {
|
|
42
|
+
energyNeeded: roundTo(energyNeeded, 2),
|
|
43
|
+
energyFromGrid: roundTo(energyFromGrid, 2),
|
|
44
|
+
chargingTimeHours: roundTo(chargingTimeHours, 2),
|
|
45
|
+
chargingTimeMinutes: roundTo(chargingTimeMinutes, 2),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=evCharging.js.map
|