Skip to content

Maximilianos/temperature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

temperature

A collection of simple temperature operations for javascript.

The collection includes functions to convert between Celsius, Fahrenheit and Kelvin temperatures.

Install

Via npm

npm i temperature

Usage

// import only the functions you need
import {celsiusToFahrenheit} from 'temperature';

const celsius = 100;
const fahrenheit = celsiusToFahrenheit(celsius); // == 212 

// ... do stuff with awesome temperatures!

Available converters

All the following methods take input of type number and return output of type number

  • celsiusToFahrenheit(celsius)
  • celsiusToKelvin(celsius)
  • fahrenheitToCelsius(fahrenheit)
  • fahrenheitToKelvin(fahrenheit)
  • kelvinToCelsius(kelvin)
  • kelvinToFahrenheit(kelvin)

License

MIT © Max GJ Panas

About

A collection of simple temperature operations

Resources

License

Stars

Watchers

Forks

Packages

No packages published