converter-celsius-fahrenheit

1.0.1 • Public • Published

Temperature Converter

This package provides two functions for converting between Celsius and Fahrenheit temperatures:

celsiusToFahrenheit(celsius)

Converts a temperature from Celsius to Fahrenheit.

Installation

Install the package using npm:

npm install converter-celsius-fahrenheit

Usage

import {fahrenheitToCelsius, celsiusToFahrenheit} from 'converter-celsius-fahrenheit'

const celsius = fahrenheitToCelsius(68);
console.log(celsius); // Output: 20
const fahrenheit =celsiusToFahrenheit(20);
console.log(fahrenheit); // Output: 68

Throws:

Error: If the input is not a number.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i converter-celsius-fahrenheit

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

1.6 kB

Total Files

3

Last publish

Collaborators

  • usama455