toBest
toBest(x)
toBest(x, unitList)
toBest(x, unitList, options)
Try it yourself:
| $1 |
toBest(unit(5000, "m"))
|
|
| $2 |
toBest(unit(3500000, "W"))
|
|
| $3 |
toBest(unit(0.000000123, "A"))
|
|
| $4 |
toBest(unit(10, "m"), "cm")
|
|
| $5 |
toBest(unit(10, "m"), "mm,km", {offset: 1.5})
|