0.1.1 • Published 3 years ago

ftpmodule v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

FTPModule


Module designed for the calculation of cardiac parameters and to have the minimum of dependencies with other modules and to be as fast and light as possible.

FunctionParametersReturn
TheoricalMaxHeartRateage: Number gender: {'m', 'f'}Number
FTPZonesage: Number gender: {'m', 'f'}Object: {"zone1": Number,"zone2": Number,"zone3": Number,"zone4": Number,"zone5": Number,"zone6": Number,"zone7": Number,}
HeartRateExtractorfile: GPX file from StravaArray: ['Number', 'Number', 'Number', 'Number', 'Number', 'Number', ...]
FTPZoneage: Number gender: {'m', 'f'} heartRate: NumberString: {zone1, zone2, zone3, zone4, zone5, zone6, zone7}
FTPZonesPercentageage: Number gender: {'m', 'f'} arr: arr: Array of Numbers from HeartRateExtractor functionObject: { z1: Percentage, z2: Percentage, z3: Percentage, z4: Percentage, z5: Percentage, z6: Percentage, z7: Percentage }

Instalation

  • NPM: npm i ftpmodule
  • Yarn: yarn add ftpmodule

How to Use

  • TheoricalMaxHeartRate:
const { TheoricalMaxHeartRate } = require('ftpmodule')
console.log(TheoricalMaxHeartRate(23, 'm'))
// Should return 197
  • FTPZones:
const { FTPZones } = require('ftpmodule')
console.log(FTPZones(23, 'm'))
/* Should return {
        zone1: '148',
        zone2: '167',
        zone3: '181',
        zone4: '189',
        zone5: '207',
        zone6: '236',
        zone7: '296'
    } */
  • HeartRateExtractor:
const fs = require('fs')
const { HeartRateExtractor } = require('ftpmodule')
const data = fs.readFileSync('./file.gpx', 'UTF-8');
console.log(HeartRateExtractor(data))
// Should return a JSON array of number 
  • FTPZone:
const { FTPZone } = require('ftpmodule')
console.log(FTPZone(23, 'm', 184))
// Should return zone4
  • FTPZonesPercentage:
const fs = require('fs')
const { FTPZonesPercentage, HeartRateExtractor } = require('ftpmodule')
const data = fs.readFileSync('./file.gpx', 'UTF-8')
console.log(FTPZonesPercentage(23, 'm', HeartRateExtractor(data)))
/* Should return {
  z1: '55.27',
  z2: '33.97',
  z3: '9.52', 
  z4: '1.11', 
  z5: '0.13', 
  z6: '0.00', 
  z7: '0.00'  
} */

0.1.1

3 years ago

0.1.0

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago