Skip to content

WatterAH/unit-cnv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unit Converter

A TypeScript package to convert between different units of measurement, such as length, temperature, time, and more.

Installation

To install the package, run the following command:

npm install unit-cnv

Usage

Import the necessary modules for the units you want to convert. For example, to convert time:

import { Time } from "unit-cnv";

const Seconds = Time.Seconds;

const secondsValue = 120;
const minutesValue = Seconds.toMinutes(secondsValue);
console.log(`${secondsValue} seconds equals ${minutesValue} minutes`);

Or by default:

import converter from "unit-cnv";

const Seconds = converter.Time.Seconds;

const secondsValue = 120;
const minutesValue = Seconds.toMinutes(secondsValue);
console.log(`${secondsValue} seconds equals ${minutesValue} minutes`);

Features

  • Mass Conversion
  • Length Conversion
  • Temperature Conversion
  • Time Conversion

Contributing

If you would like to contribute to this project, feel free to open an issue or submit a pull request.

About

A TypeScript package to convert between different units of measurement, such as length, temperature, time, and more.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published