You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
369 B
JavaScript

"use strict";
let hiddenCssMatcher = /^\/\* HIDDEN CSS BY ICSSIFY \*\/ \/\/ (.+)/;
module.exports = function unhideCss(css) {
let match = hiddenCssMatcher.exec(css);
if (match != null) {
return JSON.parse(match[1]);
} else {
// This was apparently not (hidden) CSS, but it should have been
throw new Error("Expected hidden CSS, but did not find it");
}
};