UNPKG

mylingo3d

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

11 lines (9 loc) 341 B
import Defaults from "./Defaults" import NullableDefault from "./NullableDefault" export default (defaults: Defaults<any>, key: string, editor?: boolean) => { const result = defaults[key] if (result instanceof NullableDefault) return editor ? result.value : undefined if (editor) return result ?? "" return result }