Björn f184cd7e2a | 4 years ago | |
---|---|---|
.. | ||
.npmignore | 4 years ago | |
CHANGELOG.md | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
index.js | 4 years ago | |
package.json | 4 years ago |
Converts CSS values from one unit to another
npm install css-unit-converter
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