An open API service indexing awesome lists of open source software.

https://github.com/engineer2b/ts-cooking-pathogens


https://github.com/engineer2b/ts-cooking-pathogens

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# ts-cooking-pathogens

[![Build Status](https://www.travis-ci.com/Engineer2B/ts-cooking-pathogens.svg?branch=main)](https://www.travis-ci.com/Engineer2B/ts-cooking-pathogens)
[![npm version](https://badge.fury.io/js/ts-cooking-pathogens.svg)](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.