mirror of
https://github.com/julia-actions/julia-buildpkg.git
synced 2026-02-18 03:56:54 +08:00
12 lines
267 B
JavaScript
12 lines
267 B
JavaScript
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];
|
|
});
|
|
}
|