Skip to content

Commit 1a30684

Browse files
committed
live-web.model: Added Actions.
1 parent 75ad51b commit 1a30684

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

packages/live-web/model/Actions.lv

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
component Actions{
2+
static fn bindFirst(arg:any, actionsObject:Actions){
3+
const result = {}
4+
for (const [name, val] of Object.entries(actionsObject)) {
5+
if ( typeof val === 'function' ){
6+
result[name] = val.bind(actionsObject, arg)
7+
}
8+
}
9+
return result
10+
}
11+
}

packages/live-web/model/live.module.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)