
Security News
Meet the Socket Team at RSAC and BSidesSF 2025
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
@favware/converter
Advanced tools
An awesome and typesafe unit converter for NodeJS
yarn add @favware/converter
# npm install @favware/converter
const { convert, definitions } = require('@favware/converter');
// import { convert, definitions } from '@favware/converter';
// Just pass required arguments
console.log(convert(100, 'g', 'lb')); // 0.22
// Specify decimal precision
console.log(convert(100, 'g', 'lb', { precision: 3 })); // 0.220
// Will not work if you pass units of different groups
console.log(convert(100, 'g', 'm')); // ConverterError: g and m and not in the same definition group
// Log all supported definitions
console.log(definitions);
For the full API documentation please refer to the TypeDoc generated documentation.
Favware projects are and always will be open source, even if we don't get donations. That being said, we know there are amazing people who may still want to donate just to show their appreciation. Thank you very much in advance!
We accept donations through Open Collective, Ko-fi, Paypal, Patreon and GitHub Sponsorships. You can use the buttons below to donate through your method of choice.
Donate With | Address |
---|---|
GitHub Sponsors | Click Here |
Ko-fi | Click Here |
Patreon | Click Here |
PayPal | Click Here |
Thanks goes to these wonderful people (emoji key):
Jeroen Claassens 💻 🚇 📆 📖 ⚠️ |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Unit convertion done right
The npm package @favware/converter receives a total of 18 weekly downloads. As such, @favware/converter popularity was classified as not popular.
We found that @favware/converter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
Security News
Biome's v2.0 beta introduces custom plugins, domain-specific linting, and type-aware rules while laying groundwork for HTML support and embedded language features in 2025.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.