JSPM

css-unit-converter

1.1.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1041702
  • Score
    100M100P100Q198094F
  • License MIT

Converts CSS values from one unit to another

Package Exports

  • css-unit-converter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (css-unit-converter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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