mirror of
https://github.com/Funkoala14/knowledgebase_law.git
synced 2025-06-09 02:08:16 +08:00
25 lines
806 B
JavaScript
25 lines
806 B
JavaScript
"use strict";
|
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
};
|
|
var style_to_object_1 = __importDefault(require("style-to-object"));
|
|
var utilities_1 = require("./utilities");
|
|
/**
|
|
* Parses CSS inline style to JavaScript object (camelCased).
|
|
*/
|
|
function StyleToJS(style, options) {
|
|
var output = {};
|
|
if (!style || typeof style !== 'string') {
|
|
return output;
|
|
}
|
|
(0, style_to_object_1.default)(style, function (property, value) {
|
|
// skip CSS comment
|
|
if (property && value) {
|
|
output[(0, utilities_1.camelCase)(property, options)] = value;
|
|
}
|
|
});
|
|
return output;
|
|
}
|
|
StyleToJS.default = StyleToJS;
|
|
module.exports = StyleToJS;
|
|
//# sourceMappingURL=index.js.map
|