Skip to content
/ baseroo Public

🦘 Converts positive & negative float values from one base to another between 2-64. Started in 2015. Published in 2023.

License

Notifications You must be signed in to change notification settings

ryasmi/baseroo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦘
baseroo

Converts positive & negative float values from one base to another between 2-64

License: MIT Uses Semantic Release to correctly bump versions especially for breaking changes Uses Renovate to keep dependencies updated Main branch coverage percentage from Codecov Package size from BundlePhobia
// Install it with `npm i baseroo`
import { convertBase } from 'baseroo'

const base16Value = '8f.3333333333'

// Works for floating point numbers to a precision of 10 places.
const base10Value = convertBase(base16Value, 16, 10) // '143.1999999999'

Background

Baseroo was created from a 2015 Stack Overflow Answer from a question asking "How do you convert numbers between different bases in JavaScript?". This answer and the Gist code snippet received some comments requesting some changes, so it was converted to a package with tests and documentation in January 2023 to continue its development and make it easier to use as bug fixes and improvements are made.

About

🦘 Converts positive & negative float values from one base to another between 2-64. Started in 2015. Published in 2023.

Topics

Resources

License

Security policy

Stars

Watchers

Forks