css-truncate-values
Truncate CSS numbers while retaining the original value.
;// => '.1em' ;// => '10.05ms' ;// => ['11s', '-6em', '-.10rem']
It will return the smallest possible version of any number while retaining the original value... The way it should be. 😄
Installation
$ npm install --save css-truncate-values
API
truncate(values)
Remove the inconsistencies from CSS numbers while keeping the same value.
values
(String
|Array
) A value or array of values that you want to truncate.
;// => '.8s' ;// => ['4px', '.01px']
License
MIT © Jamen Marz