Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 240 Bytes

number.md

File metadata and controls

10 lines (6 loc) · 240 Bytes

Input type number remove trailing zeros

value == ‘0’ ? ‘’ : value

Why not Number(value).toString()? This will remove end zeros too for decimals / floats, will be weird if we are inputting amount for expenses etc.