@atlaskit/eslint-plugin-design-system
Version:
The essential plugin for use with the Atlassian Design System.
18 lines (17 loc) • 578 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.makeTemplateLiteralIntoEntries = void 0;
/**
* Takes a template literal and returns [key, value] array of the css properties
*/
var makeTemplateLiteralIntoEntries = exports.makeTemplateLiteralIntoEntries = function makeTemplateLiteralIntoEntries(templateString) {
return templateString.replace(/\n/g, '').split(/;|{|}/).filter(function (el) {
return !el.match(/\@/);
}).map(function (el) {
return el.trim().split(':').map(function (e) {
return e.trim();
});
});
};