Syllabus/themes/sandpoints/node_modules/css-unit-converter
Marcell Mars fd78b9e4e3 initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
..
.npmignore initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
CHANGELOG.md initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
LICENSE initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
README.md initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
index.js initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00
package.json initial sandpoints theme commit.. 2020-08-19 01:14:35 +02:00

README.md

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