fabric
Version:
Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.
17 lines (16 loc) • 440 B
JavaScript
//#region src/parser/parseStyleObject.ts
/**
* Takes a style object and parses it in one that has only defined values
* and lowercases properties
* @param style
* @param oStyle
*/
function parseStyleObject(style, oStyle) {
Object.entries(style).forEach(([prop, value]) => {
if (value === void 0) return;
oStyle[prop.toLowerCase()] = value;
});
}
//#endregion
export { parseStyleObject };
//# sourceMappingURL=parseStyleObject.mjs.map