Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function getASketchDocument() {
const doc = new Document();
doc.setName('BrainlyPencilTextSystem}');
// DOCUMENT COLORS
Array.from(document.querySelectorAll('.colors-list > .color-box'))
.forEach(box => {
const color = getComputedStyle(box).backgroundColor;
doc.addColor(color);
});
// TEXT STYLES
Array.from(document.querySelectorAll('.text-styles > *'))
.forEach(node => {
const styleName = node.title;
const layers = nodeToSketchLayers(node.firstChild);