Skip to content

Commit f4bed31

Browse files
committed
refactor(bind): inline object properties, avoiding consts
1 parent 2522a5a commit f4bed31

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/bind.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,11 @@ function* bindings(el: Element): Iterable<Binding> {
9494
for (const action of (el.getAttribute('data-action') || '').trim().split(/\s+/)) {
9595
const eventSep = action.lastIndexOf(':')
9696
const methodSep = action.lastIndexOf('#')
97-
const type = action.slice(0, eventSep)
98-
const tag = action.slice(eventSep + 1, methodSep)
99-
const method = action.slice(methodSep + 1)
100-
yield {type, tag, method}
97+
yield {
98+
type: action.slice(0, eventSep),
99+
tag: action.slice(eventSep + 1, methodSep),
100+
method: action.slice(methodSep + 1)
101+
}
101102
}
102103
}
103104

0 commit comments

Comments
 (0)