UNPKG
corporate-frontend-mithril
Version:
latest (3.4.0)
3.4.0
3.3.0
3.2.0
Corporate frontend MithrilJS modules
corporate-frontend-mithril
/
src
/
lib
/
helpers
/
view-models.js
17 lines
(14 loc)
•
325 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const
FPO
=
require
(
'fpo'
);
let
pickAttrsStdFn =
function
(
{vm,props}
) {
return
function
(
vnode
) {
for
(
const
[key, value]
of
Object
.
entries
(
FPO
.
pick
({
v
: vnode.
attrs
,
props
: props, }))) { vm[key] = value; } }; };
module
.
exports
= { pickAttrsStdFn, };