Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let contents = [] as string[];
actionKeys.forEach(key => {
const element = actions[key];
console.log(element);
switch (element.httpMethod) {
case 'GET':
contents.push(ServiceTemplates.getMethodTemplate(element.name, element.url));
break;
default:
break;
}
});
const service = ServiceTemplates.classTemplate(controller.controllerName, contents.join('\n'));
fse.writeFileSync(`dist/${changeCase.kebabCase(controller.controllerName)}.service.ts`, service);
});
});
Object.entries(this.state.notifyPreferences).map(([key, checked]) =>
db.userPreferences.put(checked, kebabCase(key))
);
Object.entries(this.state.notifyPreferences).map(([key, checked]) =>
db.userPreferences.put(checked, kebabCase(key))
);
if (!tooltipOpen) {
playEffect("buttonHover");
}
setTooltipOpen(!tooltipOpen);
};
const Icon = icon;
return (
<div>
{
playEffect("buttonClick");
onClick(e);
}}
id={`widget-${kebabCase(name)}`}
style={{color: color || "rgb(200,150,255)"}}
/>
{!touch && (
{name}
)}
</div>
);
};