san-awesome
Version:
Font Awesome component for San, using inline SVG.
39 lines (31 loc) • 593 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.register = register;
exports.get = get;
var icons = {};
function register(data) {
for (var name in data) {
var icon = data[name];
if (!icon.paths) {
icon.paths = [];
}
if (icon.d) {
icon.paths.push({ d: icon.d });
}
if (!icon.polygons) {
icon.polygons = [];
}
if (icon.points) {
icon.polygons.push({ points: icon.points });
}
icons[name] = icon;
}
}
function get(name) {
if (name) {
return icons[name];
}
return icons;
}