UNPKG

@atlaskit/eslint-plugin-design-system

Version:

The essential plugin for use with the Atlassian Design System.

12 lines 415 B
/** * Takes a template literal and returns [key, value] array of the css properties */ export var 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(); }); }); };