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.
Files changed (508) hide show
  1. package/CHANGELOG.md +144 -0
  2. package/LICENSE +21 -0
  3. package/README.md +403 -0
  4. package/dist/automotive/batteryRuntime.d.ts +14 -0
  5. package/dist/automotive/batteryRuntime.d.ts.map +1 -0
  6. package/dist/automotive/batteryRuntime.js +38 -0
  7. package/dist/automotive/batteryRuntime.js.map +1 -0
  8. package/dist/automotive/evCharging.d.ts +14 -0
  9. package/dist/automotive/evCharging.d.ts.map +1 -0
  10. package/dist/automotive/evCharging.js +48 -0
  11. package/dist/automotive/evCharging.js.map +1 -0
  12. package/dist/automotive/fuelEconomy.d.ts +15 -0
  13. package/dist/automotive/fuelEconomy.d.ts.map +1 -0
  14. package/dist/automotive/fuelEconomy.js +61 -0
  15. package/dist/automotive/fuelEconomy.js.map +1 -0
  16. package/dist/automotive/gearRatio.d.ts +15 -0
  17. package/dist/automotive/gearRatio.d.ts.map +1 -0
  18. package/dist/automotive/gearRatio.js +39 -0
  19. package/dist/automotive/gearRatio.js.map +1 -0
  20. package/dist/automotive/index.d.ts +9 -0
  21. package/dist/automotive/index.d.ts.map +1 -0
  22. package/dist/automotive/index.js +9 -0
  23. package/dist/automotive/index.js.map +1 -0
  24. package/dist/automotive/power.d.ts +14 -0
  25. package/dist/automotive/power.d.ts.map +1 -0
  26. package/dist/automotive/power.js +52 -0
  27. package/dist/automotive/power.js.map +1 -0
  28. package/dist/automotive/tireCompare.d.ts +9 -0
  29. package/dist/automotive/tireCompare.d.ts.map +1 -0
  30. package/dist/automotive/tireCompare.js +54 -0
  31. package/dist/automotive/tireCompare.js.map +1 -0
  32. package/dist/automotive/torque.d.ts +14 -0
  33. package/dist/automotive/torque.d.ts.map +1 -0
  34. package/dist/automotive/torque.js +52 -0
  35. package/dist/automotive/torque.js.map +1 -0
  36. package/dist/automotive/types.d.ts +114 -0
  37. package/dist/automotive/types.d.ts.map +1 -0
  38. package/dist/automotive/types.js +2 -0
  39. package/dist/automotive/types.js.map +1 -0
  40. package/dist/chemical/batch.d.ts +12 -0
  41. package/dist/chemical/batch.d.ts.map +1 -0
  42. package/dist/chemical/batch.js +36 -0
  43. package/dist/chemical/batch.js.map +1 -0
  44. package/dist/chemical/concentration.d.ts +15 -0
  45. package/dist/chemical/concentration.d.ts.map +1 -0
  46. package/dist/chemical/concentration.js +45 -0
  47. package/dist/chemical/concentration.js.map +1 -0
  48. package/dist/chemical/dilution.d.ts +12 -0
  49. package/dist/chemical/dilution.d.ts.map +1 -0
  50. package/dist/chemical/dilution.js +68 -0
  51. package/dist/chemical/dilution.js.map +1 -0
  52. package/dist/chemical/index.d.ts +9 -0
  53. package/dist/chemical/index.d.ts.map +1 -0
  54. package/dist/chemical/index.js +9 -0
  55. package/dist/chemical/index.js.map +1 -0
  56. package/dist/chemical/injectionCycle.d.ts +19 -0
  57. package/dist/chemical/injectionCycle.d.ts.map +1 -0
  58. package/dist/chemical/injectionCycle.js +170 -0
  59. package/dist/chemical/injectionCycle.js.map +1 -0
  60. package/dist/chemical/ph.d.ts +13 -0
  61. package/dist/chemical/ph.d.ts.map +1 -0
  62. package/dist/chemical/ph.js +83 -0
  63. package/dist/chemical/ph.js.map +1 -0
  64. package/dist/chemical/reactor.d.ts +19 -0
  65. package/dist/chemical/reactor.d.ts.map +1 -0
  66. package/dist/chemical/reactor.js +57 -0
  67. package/dist/chemical/reactor.js.map +1 -0
  68. package/dist/chemical/shelfLife.d.ts +15 -0
  69. package/dist/chemical/shelfLife.d.ts.map +1 -0
  70. package/dist/chemical/shelfLife.js +36 -0
  71. package/dist/chemical/shelfLife.js.map +1 -0
  72. package/dist/chemical/types.d.ts +144 -0
  73. package/dist/chemical/types.d.ts.map +1 -0
  74. package/dist/chemical/types.js +2 -0
  75. package/dist/chemical/types.js.map +1 -0
  76. package/dist/construction/aggregate.d.ts +33 -0
  77. package/dist/construction/aggregate.d.ts.map +1 -0
  78. package/dist/construction/aggregate.js +92 -0
  79. package/dist/construction/aggregate.js.map +1 -0
  80. package/dist/construction/beamLoad.d.ts +12 -0
  81. package/dist/construction/beamLoad.d.ts.map +1 -0
  82. package/dist/construction/beamLoad.js +156 -0
  83. package/dist/construction/beamLoad.js.map +1 -0
  84. package/dist/construction/brick.d.ts +17 -0
  85. package/dist/construction/brick.d.ts.map +1 -0
  86. package/dist/construction/brick.js +53 -0
  87. package/dist/construction/brick.js.map +1 -0
  88. package/dist/construction/concreteMix.d.ts +9 -0
  89. package/dist/construction/concreteMix.d.ts.map +1 -0
  90. package/dist/construction/concreteMix.js +31 -0
  91. package/dist/construction/concreteMix.js.map +1 -0
  92. package/dist/construction/earthwork.d.ts +13 -0
  93. package/dist/construction/earthwork.d.ts.map +1 -0
  94. package/dist/construction/earthwork.js +25 -0
  95. package/dist/construction/earthwork.js.map +1 -0
  96. package/dist/construction/formwork.d.ts +9 -0
  97. package/dist/construction/formwork.d.ts.map +1 -0
  98. package/dist/construction/formwork.js +61 -0
  99. package/dist/construction/formwork.js.map +1 -0
  100. package/dist/construction/index.d.ts +13 -0
  101. package/dist/construction/index.d.ts.map +1 -0
  102. package/dist/construction/index.js +13 -0
  103. package/dist/construction/index.js.map +1 -0
  104. package/dist/construction/pert.d.ts +15 -0
  105. package/dist/construction/pert.d.ts.map +1 -0
  106. package/dist/construction/pert.js +207 -0
  107. package/dist/construction/pert.js.map +1 -0
  108. package/dist/construction/rebar.d.ts +16 -0
  109. package/dist/construction/rebar.d.ts.map +1 -0
  110. package/dist/construction/rebar.js +43 -0
  111. package/dist/construction/rebar.js.map +1 -0
  112. package/dist/construction/roof.d.ts +16 -0
  113. package/dist/construction/roof.d.ts.map +1 -0
  114. package/dist/construction/roof.js +65 -0
  115. package/dist/construction/roof.js.map +1 -0
  116. package/dist/construction/slope.d.ts +14 -0
  117. package/dist/construction/slope.d.ts.map +1 -0
  118. package/dist/construction/slope.js +54 -0
  119. package/dist/construction/slope.js.map +1 -0
  120. package/dist/construction/stair.d.ts +17 -0
  121. package/dist/construction/stair.d.ts.map +1 -0
  122. package/dist/construction/stair.js +69 -0
  123. package/dist/construction/stair.js.map +1 -0
  124. package/dist/construction/types.d.ts +219 -0
  125. package/dist/construction/types.d.ts.map +1 -0
  126. package/dist/construction/types.js +2 -0
  127. package/dist/construction/types.js.map +1 -0
  128. package/dist/electronics/awg.d.ts +9 -0
  129. package/dist/electronics/awg.d.ts.map +1 -0
  130. package/dist/electronics/awg.js +66 -0
  131. package/dist/electronics/awg.js.map +1 -0
  132. package/dist/electronics/capacitor.d.ts +9 -0
  133. package/dist/electronics/capacitor.d.ts.map +1 -0
  134. package/dist/electronics/capacitor.js +51 -0
  135. package/dist/electronics/capacitor.js.map +1 -0
  136. package/dist/electronics/index.d.ts +12 -0
  137. package/dist/electronics/index.d.ts.map +1 -0
  138. package/dist/electronics/index.js +12 -0
  139. package/dist/electronics/index.js.map +1 -0
  140. package/dist/electronics/led.d.ts +9 -0
  141. package/dist/electronics/led.d.ts.map +1 -0
  142. package/dist/electronics/led.js +72 -0
  143. package/dist/electronics/led.js.map +1 -0
  144. package/dist/electronics/reflow.d.ts +12 -0
  145. package/dist/electronics/reflow.d.ts.map +1 -0
  146. package/dist/electronics/reflow.js +77 -0
  147. package/dist/electronics/reflow.js.map +1 -0
  148. package/dist/electronics/resistor.d.ts +8 -0
  149. package/dist/electronics/resistor.d.ts.map +1 -0
  150. package/dist/electronics/resistor.js +137 -0
  151. package/dist/electronics/resistor.js.map +1 -0
  152. package/dist/electronics/smt-takt.d.ts +8 -0
  153. package/dist/electronics/smt-takt.d.ts.map +1 -0
  154. package/dist/electronics/smt-takt.js +59 -0
  155. package/dist/electronics/smt-takt.js.map +1 -0
  156. package/dist/electronics/solder.d.ts +8 -0
  157. package/dist/electronics/solder.d.ts.map +1 -0
  158. package/dist/electronics/solder.js +46 -0
  159. package/dist/electronics/solder.js.map +1 -0
  160. package/dist/electronics/stencil.d.ts +9 -0
  161. package/dist/electronics/stencil.d.ts.map +1 -0
  162. package/dist/electronics/stencil.js +78 -0
  163. package/dist/electronics/stencil.js.map +1 -0
  164. package/dist/electronics/trace.d.ts +8 -0
  165. package/dist/electronics/trace.d.ts.map +1 -0
  166. package/dist/electronics/trace.js +75 -0
  167. package/dist/electronics/trace.js.map +1 -0
  168. package/dist/electronics/types.d.ts +145 -0
  169. package/dist/electronics/types.d.ts.map +1 -0
  170. package/dist/electronics/types.js +2 -0
  171. package/dist/electronics/types.js.map +1 -0
  172. package/dist/electronics/via.d.ts +12 -0
  173. package/dist/electronics/via.d.ts.map +1 -0
  174. package/dist/electronics/via.js +63 -0
  175. package/dist/electronics/via.js.map +1 -0
  176. package/dist/energy/carbonFootprint.d.ts +13 -0
  177. package/dist/energy/carbonFootprint.d.ts.map +1 -0
  178. package/dist/energy/carbonFootprint.js +41 -0
  179. package/dist/energy/carbonFootprint.js.map +1 -0
  180. package/dist/energy/compressedAirCost.d.ts +14 -0
  181. package/dist/energy/compressedAirCost.d.ts.map +1 -0
  182. package/dist/energy/compressedAirCost.js +39 -0
  183. package/dist/energy/compressedAirCost.js.map +1 -0
  184. package/dist/energy/index.d.ts +8 -0
  185. package/dist/energy/index.d.ts.map +1 -0
  186. package/dist/energy/index.js +8 -0
  187. package/dist/energy/index.js.map +1 -0
  188. package/dist/energy/motorEfficiency.d.ts +14 -0
  189. package/dist/energy/motorEfficiency.d.ts.map +1 -0
  190. package/dist/energy/motorEfficiency.js +47 -0
  191. package/dist/energy/motorEfficiency.js.map +1 -0
  192. package/dist/energy/pfCorrection.d.ts +15 -0
  193. package/dist/energy/pfCorrection.d.ts.map +1 -0
  194. package/dist/energy/pfCorrection.js +56 -0
  195. package/dist/energy/pfCorrection.js.map +1 -0
  196. package/dist/energy/powerCost.d.ts +15 -0
  197. package/dist/energy/powerCost.d.ts.map +1 -0
  198. package/dist/energy/powerCost.js +37 -0
  199. package/dist/energy/powerCost.js.map +1 -0
  200. package/dist/energy/types.d.ts +119 -0
  201. package/dist/energy/types.d.ts.map +1 -0
  202. package/dist/energy/types.js +2 -0
  203. package/dist/energy/types.js.map +1 -0
  204. package/dist/energy/vfdSavings.d.ts +16 -0
  205. package/dist/energy/vfdSavings.d.ts.map +1 -0
  206. package/dist/energy/vfdSavings.js +57 -0
  207. package/dist/energy/vfdSavings.js.map +1 -0
  208. package/dist/food/calorie.d.ts +13 -0
  209. package/dist/food/calorie.d.ts.map +1 -0
  210. package/dist/food/calorie.js +42 -0
  211. package/dist/food/calorie.js.map +1 -0
  212. package/dist/food/expiry.d.ts +13 -0
  213. package/dist/food/expiry.d.ts.map +1 -0
  214. package/dist/food/expiry.js +58 -0
  215. package/dist/food/expiry.js.map +1 -0
  216. package/dist/food/haccp.d.ts +18 -0
  217. package/dist/food/haccp.d.ts.map +1 -0
  218. package/dist/food/haccp.js +70 -0
  219. package/dist/food/haccp.js.map +1 -0
  220. package/dist/food/index.d.ts +6 -0
  221. package/dist/food/index.d.ts.map +1 -0
  222. package/dist/food/index.js +6 -0
  223. package/dist/food/index.js.map +1 -0
  224. package/dist/food/nutrition.d.ts +12 -0
  225. package/dist/food/nutrition.d.ts.map +1 -0
  226. package/dist/food/nutrition.js +75 -0
  227. package/dist/food/nutrition.js.map +1 -0
  228. package/dist/food/types.d.ts +104 -0
  229. package/dist/food/types.d.ts.map +1 -0
  230. package/dist/food/types.js +2 -0
  231. package/dist/food/types.js.map +1 -0
  232. package/dist/index.d.ts +7 -0
  233. package/dist/index.d.ts.map +1 -0
  234. package/dist/index.js +9 -0
  235. package/dist/index.js.map +1 -0
  236. package/dist/logistics/cbm.d.ts +12 -0
  237. package/dist/logistics/cbm.d.ts.map +1 -0
  238. package/dist/logistics/cbm.js +37 -0
  239. package/dist/logistics/cbm.js.map +1 -0
  240. package/dist/logistics/containerFit.d.ts +12 -0
  241. package/dist/logistics/containerFit.d.ts.map +1 -0
  242. package/dist/logistics/containerFit.js +73 -0
  243. package/dist/logistics/containerFit.js.map +1 -0
  244. package/dist/logistics/dimWeight.d.ts +13 -0
  245. package/dist/logistics/dimWeight.d.ts.map +1 -0
  246. package/dist/logistics/dimWeight.js +50 -0
  247. package/dist/logistics/dimWeight.js.map +1 -0
  248. package/dist/logistics/eoq.d.ts +18 -0
  249. package/dist/logistics/eoq.d.ts.map +1 -0
  250. package/dist/logistics/eoq.js +42 -0
  251. package/dist/logistics/eoq.js.map +1 -0
  252. package/dist/logistics/fillRate.d.ts +22 -0
  253. package/dist/logistics/fillRate.d.ts.map +1 -0
  254. package/dist/logistics/fillRate.js +84 -0
  255. package/dist/logistics/fillRate.js.map +1 -0
  256. package/dist/logistics/freightClass.d.ts +12 -0
  257. package/dist/logistics/freightClass.d.ts.map +1 -0
  258. package/dist/logistics/freightClass.js +68 -0
  259. package/dist/logistics/freightClass.js.map +1 -0
  260. package/dist/logistics/index.d.ts +15 -0
  261. package/dist/logistics/index.d.ts.map +1 -0
  262. package/dist/logistics/index.js +15 -0
  263. package/dist/logistics/index.js.map +1 -0
  264. package/dist/logistics/kanban.d.ts +19 -0
  265. package/dist/logistics/kanban.d.ts.map +1 -0
  266. package/dist/logistics/kanban.js +48 -0
  267. package/dist/logistics/kanban.js.map +1 -0
  268. package/dist/logistics/pallet3d.d.ts +16 -0
  269. package/dist/logistics/pallet3d.d.ts.map +1 -0
  270. package/dist/logistics/pallet3d.js +380 -0
  271. package/dist/logistics/pallet3d.js.map +1 -0
  272. package/dist/logistics/palletStack.d.ts +12 -0
  273. package/dist/logistics/palletStack.d.ts.map +1 -0
  274. package/dist/logistics/palletStack.js +65 -0
  275. package/dist/logistics/palletStack.js.map +1 -0
  276. package/dist/logistics/pickTime.d.ts +17 -0
  277. package/dist/logistics/pickTime.d.ts.map +1 -0
  278. package/dist/logistics/pickTime.js +70 -0
  279. package/dist/logistics/pickTime.js.map +1 -0
  280. package/dist/logistics/safetyStock.d.ts +24 -0
  281. package/dist/logistics/safetyStock.d.ts.map +1 -0
  282. package/dist/logistics/safetyStock.js +99 -0
  283. package/dist/logistics/safetyStock.js.map +1 -0
  284. package/dist/logistics/shipping.d.ts +16 -0
  285. package/dist/logistics/shipping.d.ts.map +1 -0
  286. package/dist/logistics/shipping.js +115 -0
  287. package/dist/logistics/shipping.js.map +1 -0
  288. package/dist/logistics/tsp.d.ts +12 -0
  289. package/dist/logistics/tsp.d.ts.map +1 -0
  290. package/dist/logistics/tsp.js +166 -0
  291. package/dist/logistics/tsp.js.map +1 -0
  292. package/dist/logistics/types.d.ts +315 -0
  293. package/dist/logistics/types.d.ts.map +1 -0
  294. package/dist/logistics/types.js +5 -0
  295. package/dist/logistics/types.js.map +1 -0
  296. package/dist/metal/bearing.d.ts +11 -0
  297. package/dist/metal/bearing.d.ts.map +1 -0
  298. package/dist/metal/bearing.js +32 -0
  299. package/dist/metal/bearing.js.map +1 -0
  300. package/dist/metal/bendAllowance.d.ts +13 -0
  301. package/dist/metal/bendAllowance.d.ts.map +1 -0
  302. package/dist/metal/bendAllowance.js +75 -0
  303. package/dist/metal/bendAllowance.js.map +1 -0
  304. package/dist/metal/bolt.d.ts +32 -0
  305. package/dist/metal/bolt.d.ts.map +1 -0
  306. package/dist/metal/bolt.js +149 -0
  307. package/dist/metal/bolt.js.map +1 -0
  308. package/dist/metal/cutting.d.ts +10 -0
  309. package/dist/metal/cutting.d.ts.map +1 -0
  310. package/dist/metal/cutting.js +55 -0
  311. package/dist/metal/cutting.js.map +1 -0
  312. package/dist/metal/cuttingStock.d.ts +8 -0
  313. package/dist/metal/cuttingStock.d.ts.map +1 -0
  314. package/dist/metal/cuttingStock.js +89 -0
  315. package/dist/metal/cuttingStock.js.map +1 -0
  316. package/dist/metal/flatPattern.d.ts +12 -0
  317. package/dist/metal/flatPattern.d.ts.map +1 -0
  318. package/dist/metal/flatPattern.js +50 -0
  319. package/dist/metal/flatPattern.js.map +1 -0
  320. package/dist/metal/gear.d.ts +13 -0
  321. package/dist/metal/gear.d.ts.map +1 -0
  322. package/dist/metal/gear.js +79 -0
  323. package/dist/metal/gear.js.map +1 -0
  324. package/dist/metal/hardness.d.ts +15 -0
  325. package/dist/metal/hardness.d.ts.map +1 -0
  326. package/dist/metal/hardness.js +77 -0
  327. package/dist/metal/hardness.js.map +1 -0
  328. package/dist/metal/index.d.ts +24 -0
  329. package/dist/metal/index.d.ts.map +1 -0
  330. package/dist/metal/index.js +24 -0
  331. package/dist/metal/index.js.map +1 -0
  332. package/dist/metal/kFactorReverse.d.ts +19 -0
  333. package/dist/metal/kFactorReverse.d.ts.map +1 -0
  334. package/dist/metal/kFactorReverse.js +39 -0
  335. package/dist/metal/kFactorReverse.js.map +1 -0
  336. package/dist/metal/material.d.ts +5 -0
  337. package/dist/metal/material.d.ts.map +1 -0
  338. package/dist/metal/material.js +56 -0
  339. package/dist/metal/material.js.map +1 -0
  340. package/dist/metal/metalWeight.d.ts +10 -0
  341. package/dist/metal/metalWeight.d.ts.map +1 -0
  342. package/dist/metal/metalWeight.js +82 -0
  343. package/dist/metal/metalWeight.js.map +1 -0
  344. package/dist/metal/pressFit.d.ts +15 -0
  345. package/dist/metal/pressFit.d.ts.map +1 -0
  346. package/dist/metal/pressFit.js +96 -0
  347. package/dist/metal/pressFit.js.map +1 -0
  348. package/dist/metal/pressTonnage.d.ts +13 -0
  349. package/dist/metal/pressTonnage.d.ts.map +1 -0
  350. package/dist/metal/pressTonnage.js +86 -0
  351. package/dist/metal/pressTonnage.js.map +1 -0
  352. package/dist/metal/roughness.d.ts +6 -0
  353. package/dist/metal/roughness.d.ts.map +1 -0
  354. package/dist/metal/roughness.js +62 -0
  355. package/dist/metal/roughness.js.map +1 -0
  356. package/dist/metal/screw.d.ts +7 -0
  357. package/dist/metal/screw.d.ts.map +1 -0
  358. package/dist/metal/screw.js +44 -0
  359. package/dist/metal/screw.js.map +1 -0
  360. package/dist/metal/spring.d.ts +11 -0
  361. package/dist/metal/spring.d.ts.map +1 -0
  362. package/dist/metal/spring.js +59 -0
  363. package/dist/metal/spring.js.map +1 -0
  364. package/dist/metal/tap.d.ts +16 -0
  365. package/dist/metal/tap.d.ts.map +1 -0
  366. package/dist/metal/tap.js +62 -0
  367. package/dist/metal/tap.js.map +1 -0
  368. package/dist/metal/thread.d.ts +8 -0
  369. package/dist/metal/thread.d.ts.map +1 -0
  370. package/dist/metal/thread.js +75 -0
  371. package/dist/metal/thread.js.map +1 -0
  372. package/dist/metal/tolerance.d.ts +6 -0
  373. package/dist/metal/tolerance.d.ts.map +1 -0
  374. package/dist/metal/tolerance.js +113 -0
  375. package/dist/metal/tolerance.js.map +1 -0
  376. package/dist/metal/types.d.ts +494 -0
  377. package/dist/metal/types.d.ts.map +1 -0
  378. package/dist/metal/types.js +2 -0
  379. package/dist/metal/types.js.map +1 -0
  380. package/dist/metal/vibration.d.ts +6 -0
  381. package/dist/metal/vibration.d.ts.map +1 -0
  382. package/dist/metal/vibration.js +153 -0
  383. package/dist/metal/vibration.js.map +1 -0
  384. package/dist/metal/weldHeat.d.ts +6 -0
  385. package/dist/metal/weldHeat.d.ts.map +1 -0
  386. package/dist/metal/weldHeat.js +138 -0
  387. package/dist/metal/weldHeat.js.map +1 -0
  388. package/dist/metal/welding.d.ts +6 -0
  389. package/dist/metal/welding.d.ts.map +1 -0
  390. package/dist/metal/welding.js +80 -0
  391. package/dist/metal/welding.js.map +1 -0
  392. package/dist/quality/aql.d.ts +10 -0
  393. package/dist/quality/aql.d.ts.map +1 -0
  394. package/dist/quality/aql.js +104 -0
  395. package/dist/quality/aql.js.map +1 -0
  396. package/dist/quality/cpk.d.ts +14 -0
  397. package/dist/quality/cpk.d.ts.map +1 -0
  398. package/dist/quality/cpk.js +44 -0
  399. package/dist/quality/cpk.js.map +1 -0
  400. package/dist/quality/cycle.d.ts +11 -0
  401. package/dist/quality/cycle.d.ts.map +1 -0
  402. package/dist/quality/cycle.js +55 -0
  403. package/dist/quality/cycle.js.map +1 -0
  404. package/dist/quality/downtime.d.ts +9 -0
  405. package/dist/quality/downtime.d.ts.map +1 -0
  406. package/dist/quality/downtime.js +28 -0
  407. package/dist/quality/downtime.js.map +1 -0
  408. package/dist/quality/dpmo.d.ts +10 -0
  409. package/dist/quality/dpmo.d.ts.map +1 -0
  410. package/dist/quality/dpmo.js +114 -0
  411. package/dist/quality/dpmo.js.map +1 -0
  412. package/dist/quality/index.d.ts +15 -0
  413. package/dist/quality/index.d.ts.map +1 -0
  414. package/dist/quality/index.js +15 -0
  415. package/dist/quality/index.js.map +1 -0
  416. package/dist/quality/lineBalancing.d.ts +9 -0
  417. package/dist/quality/lineBalancing.d.ts.map +1 -0
  418. package/dist/quality/lineBalancing.js +185 -0
  419. package/dist/quality/lineBalancing.js.map +1 -0
  420. package/dist/quality/mtbf.d.ts +13 -0
  421. package/dist/quality/mtbf.d.ts.map +1 -0
  422. package/dist/quality/mtbf.js +48 -0
  423. package/dist/quality/mtbf.js.map +1 -0
  424. package/dist/quality/oee.d.ts +11 -0
  425. package/dist/quality/oee.d.ts.map +1 -0
  426. package/dist/quality/oee.js +43 -0
  427. package/dist/quality/oee.js.map +1 -0
  428. package/dist/quality/ppk.d.ts +15 -0
  429. package/dist/quality/ppk.d.ts.map +1 -0
  430. package/dist/quality/ppk.js +61 -0
  431. package/dist/quality/ppk.js.map +1 -0
  432. package/dist/quality/ppm.d.ts +9 -0
  433. package/dist/quality/ppm.d.ts.map +1 -0
  434. package/dist/quality/ppm.js +134 -0
  435. package/dist/quality/ppm.js.map +1 -0
  436. package/dist/quality/rpn.d.ts +11 -0
  437. package/dist/quality/rpn.d.ts.map +1 -0
  438. package/dist/quality/rpn.js +48 -0
  439. package/dist/quality/rpn.js.map +1 -0
  440. package/dist/quality/takt.d.ts +13 -0
  441. package/dist/quality/takt.d.ts.map +1 -0
  442. package/dist/quality/takt.js +44 -0
  443. package/dist/quality/takt.js.map +1 -0
  444. package/dist/quality/types.d.ts +261 -0
  445. package/dist/quality/types.d.ts.map +1 -0
  446. package/dist/quality/types.js +2 -0
  447. package/dist/quality/types.js.map +1 -0
  448. package/dist/quality/yield.d.ts +12 -0
  449. package/dist/quality/yield.d.ts.map +1 -0
  450. package/dist/quality/yield.js +56 -0
  451. package/dist/quality/yield.js.map +1 -0
  452. package/dist/safety/fallClearance.d.ts +12 -0
  453. package/dist/safety/fallClearance.d.ts.map +1 -0
  454. package/dist/safety/fallClearance.js +37 -0
  455. package/dist/safety/fallClearance.js.map +1 -0
  456. package/dist/safety/havsCalculate.d.ts +16 -0
  457. package/dist/safety/havsCalculate.d.ts.map +1 -0
  458. package/dist/safety/havsCalculate.js +103 -0
  459. package/dist/safety/havsCalculate.js.map +1 -0
  460. package/dist/safety/index.d.ts +8 -0
  461. package/dist/safety/index.d.ts.map +1 -0
  462. package/dist/safety/index.js +8 -0
  463. package/dist/safety/index.js.map +1 -0
  464. package/dist/safety/nioshLifting.d.ts +21 -0
  465. package/dist/safety/nioshLifting.d.ts.map +1 -0
  466. package/dist/safety/nioshLifting.js +164 -0
  467. package/dist/safety/nioshLifting.js.map +1 -0
  468. package/dist/safety/noiseExposure.d.ts +22 -0
  469. package/dist/safety/noiseExposure.d.ts.map +1 -0
  470. package/dist/safety/noiseExposure.js +76 -0
  471. package/dist/safety/noiseExposure.js.map +1 -0
  472. package/dist/safety/respiratorCalculate.d.ts +14 -0
  473. package/dist/safety/respiratorCalculate.d.ts.map +1 -0
  474. package/dist/safety/respiratorCalculate.js +90 -0
  475. package/dist/safety/respiratorCalculate.js.map +1 -0
  476. package/dist/safety/types.d.ts +93 -0
  477. package/dist/safety/types.d.ts.map +1 -0
  478. package/dist/safety/types.js +2 -0
  479. package/dist/safety/types.js.map +1 -0
  480. package/dist/safety/wbgtCalculate.d.ts +25 -0
  481. package/dist/safety/wbgtCalculate.d.ts.map +1 -0
  482. package/dist/safety/wbgtCalculate.js +65 -0
  483. package/dist/safety/wbgtCalculate.js.map +1 -0
  484. package/dist/utility/assignment.d.ts +11 -0
  485. package/dist/utility/assignment.d.ts.map +1 -0
  486. package/dist/utility/assignment.js +113 -0
  487. package/dist/utility/assignment.js.map +1 -0
  488. package/dist/utility/index.d.ts +4 -0
  489. package/dist/utility/index.d.ts.map +1 -0
  490. package/dist/utility/index.js +4 -0
  491. package/dist/utility/index.js.map +1 -0
  492. package/dist/utility/qrcode.d.ts +30 -0
  493. package/dist/utility/qrcode.d.ts.map +1 -0
  494. package/dist/utility/qrcode.js +30 -0
  495. package/dist/utility/qrcode.js.map +1 -0
  496. package/dist/utility/types.d.ts +64 -0
  497. package/dist/utility/types.d.ts.map +1 -0
  498. package/dist/utility/types.js +2 -0
  499. package/dist/utility/types.js.map +1 -0
  500. package/dist/utility/unit.d.ts +25 -0
  501. package/dist/utility/unit.d.ts.map +1 -0
  502. package/dist/utility/unit.js +136 -0
  503. package/dist/utility/unit.js.map +1 -0
  504. package/dist/utils.d.ts +9 -0
  505. package/dist/utils.d.ts.map +1 -0
  506. package/dist/utils.js +12 -0
  507. package/dist/utils.js.map +1 -0
  508. 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
+ [![npm version](https://img.shields.io/npm/v/formulab.svg)](https://www.npmjs.com/package/formulab)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](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