Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createRow(state) {
const row = {
render: wire(),
class(selected) {
return state.id === selected ? 'danger' : '';
},
onremove() {
remove(state.id);
},
onselect() {
select(state.id);
}
};
rows.set(state, row);
return row;
}