npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

medicolib

v1.0.2

Published

A JavaScript library for cardiovascular calculations.

Downloads

9

Readme

MedicoLib

MedicoLib is a JavaScript library for cardiovascular calculations. It provides functions to perform various cardiovascular calculations, such as cardiac output, cardiac index, max heart rate, target heart rate, and mean arterial pressure (MAP).

Table of Contents

Installation

To install MedicoLib, you can use npm:

npm install medicolib

## API Reference
cardiacOutput(heartRate, strokeVolume)
Calculates the cardiac output.

Parameters:

heartRate (number): The heart rate in beats per minute.
strokeVolume (number): The stroke volume in milliliters per beat.
Returns: The calculated cardiac output in milliliters per minute.

cardiacIndex(cardiacOutputValue, bodySurfaceArea)
Calculates the cardiac index.

Parameters:

cardiacOutputValue (number): The cardiac output value in milliliters per minute.
bodySurfaceArea (number): The body surface area in square meters.
Returns: The calculated cardiac index in milliliters per minute per square meter.

maxHeartRate(ageInYears)
Calculates the maximum heart rate.

Parameters:

ageInYears (number): The age in years.
Returns: The calculated maximum heart rate in beats per minute.

targetHeartRate(maxHeartRateValue, targetPercent)
Calculates the target heart rate based on the maximum heart rate.

Parameters:

maxHeartRateValue (number): The maximum heart rate in beats per minute.
targetPercent (number): The target heart rate as a decimal percentage.
Returns: The calculated target heart rate in beats per minute.

MeanArterialPressure_MAP(DiastolicBP, SystolicBP)
Calculates the mean arterial pressure (MAP) using diastolic and systolic blood pressure values.

Parameters:

DiastolicBP (number): The diastolic blood pressure in millimeters of mercury (mmHg).
SystolicBP (number): The systolic blood pressure in millimeters of mercury (mmHg).
Returns: The calculated mean arterial pressure (MAP) in millimeters of mercury (mmHg).

Usage
Here's how you can use MedicoLib in your JavaScript code:

const { cardiacOutput, maxHeartRate } = require('medicolib');

const output = cardiacOutput(70, 80);
console.log('Cardiac Output:', output);

const heartRate = maxHeartRate(30);
console.log('Max Heart Rate:', heartRate);
Contributing
Contributions are welcome! If you find a bug or want to add a new feature, feel free to open an issue or submit a pull request.

License
This project is licensed under the MIT License