systemquery/src/static/js/ui/forkawesome_emel.mjs

11 lines
323 B
JavaScript
Raw Normal View History

"use strict";
export default function(def) {
if(typeof def === "string")
return `span.fa.fa-${def}`;
if(def instanceof Array)
return def.map(el, i => `span.fa.fa-${el}.fa-stack-${def.length-i}x`).join(`+`);
throw new Error(`Error: Expected def of type string or Array, but got variable of type ${typeof def}`);
}