mirror of
https://github.com/thangisme/notes.git
synced 2024-11-01 05:27:15 -04:00
32 lines
704 B
JavaScript
32 lines
704 B
JavaScript
|
"use strict";
|
||
|
|
||
|
Object.defineProperty(exports, "__esModule", {
|
||
|
value: true
|
||
|
});
|
||
|
|
||
|
exports.default = function (statement) {
|
||
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
||
|
noRawBefore = _ref.noRawBefore;
|
||
|
|
||
|
var result = "";
|
||
|
if (statement.type !== "rule" && statement.type !== "atrule") {
|
||
|
return result;
|
||
|
}
|
||
|
|
||
|
if (!noRawBefore) {
|
||
|
result += statement.raws.before;
|
||
|
}
|
||
|
if (statement.type === "rule") {
|
||
|
result += statement.selector;
|
||
|
} else {
|
||
|
result += "@" + statement.name + statement.raws.afterName + statement.params;
|
||
|
}
|
||
|
|
||
|
var between = statement.raws.between;
|
||
|
|
||
|
if (between !== undefined) {
|
||
|
result += between;
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
};
|