Detalhes do pacote

css-unit-converter

andyjansson4.8mMIT1.1.2

Converts CSS values from one unit to another

css, value, unit, converter

readme (leia-me)

css-unit-converter Build Status

Converts CSS values from one unit to another

Installation

npm install css-unit-converter

Usage

var convert = require('css-unit-converter');
//convert 1 inch to pc
convert(1, 'in', 'pc'); // 6

//convert 10px to cm with a maximum of 10 decimals
convert(10, 'px', 'cm', 10); // 0.2645833333

changelog (log de mudanças)

1.1.2 - 2020-05-16

  • Add TypeScript definitions (thanks to @seaneking)

1.1.1 - 2017-01-25

  • Change decimal rounding technique

1.1 - 2017-01-24

  • Add optional precision argument

1.0 - 2015-05-18

  • Initial release