@violacss/converter-sass-to-js
v0.1.0
Published
converter-sass-to-js is a helper to convert SASS data types to JavaScript data types
Downloads
5
Maintainers
Readme
@violacss/converter-sass-to-js
This is a helper to convert SASS data types to JavaScript data types
installation
$ yarn add @violacss/converter-sass-to-js
or
$ npm i @violacss/converter-sass-to-js --save
Usage
const sass = require('node-sass');
const toJs = require('@violacss/converter-sass-to-js');
const number = new sass.types.Number(42,'rem');
const result = toJs(number); // -> {value: 42, unit:'rem'}