Sign in
cobalt
/
cobalt
/
e83fce97d7405b0b5e569d961aa431b1112ac6ac
/
.
/
src
/
third_party
/
devtools
/
node_modules
/
handlebars
/
lib
/
handlebars
/
helpers
/
lookup.js
blob: dcd58517823490fc3cdc4eab524b8605c635c988 [
file
] [
log
] [
blame
]
export
default
function
(
instance
)
{
instance
.
registerHelper
(
'lookup'
,
function
(
obj
,
field
)
{
if
(!
obj
)
{
return
obj
;
}
if
(
field
===
'constructor'
&&
!
obj
.
propertyIsEnumerable
(
field
))
{
return
undefined
;
}
return
obj
[
field
];
});
}