https://github.com/engineer2b/ts-cooking-pathogens
https://github.com/engineer2b/ts-cooking-pathogens
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/engineer2b/ts-cooking-pathogens
- Owner: Engineer2B
- License: mit
- Created: 2020-12-29T20:17:10.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-01-17T12:11:53.000Z (over 3 years ago)
- Last Synced: 2025-04-12T02:17:56.115Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/ts-cooking-pathogens
- Size: 436 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ts-cooking-pathogens
[](https://www.travis-ci.com/Engineer2B/ts-cooking-pathogens)
[](https://badge.fury.io/js/ts-cooking-pathogens)
This package contains classes to calculate units of common pathogens present after a procedure according to the D/z model and data from (van Asselt E D & Zwietering M H, 2006).
It was created by following [this guide](https://itnext.io/step-by-step-building-and-publishing-an-npm-typescript-package-44fe7164964c).
## Installation
Install from npm:
```powershell
npm install ts-cooking-pathogens --save
```
## Usage
```ts
import { Food } from 'node_modules/ts-cooking-pathogens/build/Model/Food';
import { meanInactivations } from 'node_modules/ts-cooking-pathogens/build/Data/InactivationValues';
// tslint:disable: no-magic-numbers
const meanFood = Food.New(meanInactivations);
const leastReduced = meanFood.CalculateLeastReduced([70,140], [3*60,5/60]);
const mostReduced = meanFood.CalculateMostReduced([70,140], [3*60,5/60]);
const reductions = meanFood.CalculateReductions([70,140], [3*60,5/60]);
console.log(meanInactivations.Campylobacter.CalculateLog10Reductions([70,140], [3*60,5/60]));
console.log(-Math.log10(meanInactivations.BacillusCereus.CalculateReduction(1, 140, 2 / 60)));
console.log(meanInactivations.BacillusCereus.CalculateLog10Reductions([140, 60, 30], [2 / 60, 3 / 60, 40 / 60]));
console.log(Math.log10(10 ** (((meanInactivations.ClostridiumBotulinumNonProteolytic.CalculateD(140)) * 2 / 60))));
```
More info on how to consume this package [here](https://github.com/microsoft/TypeScript/issues/8305#issuecomment-254017287).
Check [github](https://github.com/Engineer2B/ts-cooking-pathogens/tree/master/src) for available classes.
## License
The MIT License (MIT)
## References
van Asselt, E. D. and Zwietering, M., 2006. A systematic approach to determine global thermal inactivation parameters for various food pathogens. International Journal of Food Microbiology, 107(1), pp.73-82.