Package Manager Installation
Install Univerto using your preferred package manager:
Requirements
Univerto requires Node.js 18.0.0 or higher.
The library is designed to work in both Node.js and browser environments with zero dependencies.
TypeScript Support
Univerto is written in TypeScript and includes built-in type definitions. No additional @types packages are needed.
Verify Installation
After installation, you can verify that Univerto is working by creating a simple test file:
import { TIME_UNIT, TimeUnitConverter } from 'univerto/time'
const milliseconds = TimeUnitConverter.from(1, TIME_UNIT.HOUR)
.to(TIME_UNIT.MILLISECOND)
.convert()
console.log(milliseconds) // 3600000
Run the file:
If you see 3600000 in the output, Univerto is installed correctly.
Import Structure
Univerto uses subpath exports to keep your bundle size minimal. Import only the converters you need:
// Import specific unit converters
import { TIME_UNIT, TimeUnitConverter } from 'univerto/time'
import { LENGTH_UNIT, LengthUnitConverter } from 'univerto/length'
import { MASS_UNIT, MassUnitConverter } from 'univerto/mass'
// Available subpaths:
// univerto/time
// univerto/length
// univerto/area
// univerto/volume
// univerto/mass
// univerto/speed
// univerto/data
// univerto/voltage
// univerto/current
// univerto/frequency
By importing only the converters you need, you keep your bundle size small and your application fast.
Next Steps
Quick Start
Learn how to perform your first unit conversion