UNPKG

fabric

Version:

Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.

1 lines 700 B
{"version":3,"file":"parseStyleObject.min.mjs","names":[],"sources":["../../../src/parser/parseStyleObject.ts"],"sourcesContent":["/**\n * Takes a style object and parses it in one that has only defined values\n * and lowercases properties\n * @param style\n * @param oStyle\n */\nexport function parseStyleObject(\n style: Record<string, any>,\n oStyle: Record<string, any>,\n): void {\n Object.entries(style).forEach(([prop, value]) => {\n if (value === undefined) {\n return;\n }\n oStyle[prop.toLowerCase()] = value;\n });\n}\n"],"mappings":"AAMA,SAAgB,EACd,EACA,EAAA,CAEA,OAAO,QAAQ,EAAA,CAAO,SAAA,CAAU,EAAM,KAAA,CAChC,IADgC,IACtB,KAGd,EAAO,EAAK,aAAA,EAAiB,IAAA,CAAA,OAAA,KAAA"}