2.0.1 • Published 11 months ago

dolbear v2.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
11 months ago

dolbear

Node module and CLI for Dolbear's Law.

Dolbear's law states the relationship between the air temperature and the rate at which crickets chirp

Formula for Dolbear's Law. Use the number of cricket chirps to calculate the temperature. For celsius, count the number of chirps per 8 seconds. For fahrenheit, count the number of chirps per 15 seconds.

CLI

Usage: dolbear options

Options: -V, --version output the version number --scale <c|f> set the scale (fahrenheit or celsius) (default: "c") -h, --help display help for command

$ npx dolbear --scale f 15

The estimated temperature based on your input is 55° Fahrenheit.

API

For the temperature in Fahrenheit:

const dolbear = require('dolbear');

const numberOfCricketChirpsPer15Seconds = 5;
const temperature = dolbear.Fahrenheit(numberOfCricketChirpsPer15Seconds);

console.log(temperature); // 45

For the temperature in Celsius:

const dolbear = require('dolbear');

const numberOfCricketChirpsPer8Seconds = 5;
const temperature = dolbear.Celsius(numberOfCricketChirpsPer8Seconds);

console.log(temperature); // 10
2.0.1

11 months ago

2.0.0

11 months ago

1.0.0

11 months ago