Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function buildOptions(schema, uiWidget) {
// Note: uiWidget can be undefined, a string or an object; we only deal with
// the inline option when we're provided a definition object.
return {
inline: isObject(uiWidget) &&
isObject(uiWidget.options) &&
uiWidget.options.inline,
enumOptions: optionsList(Object.assign({
enumNames: ['true', 'false'],
enum: [true, false]
}, {enumNames: schema.enumNames}))
};
}
function buildOptions(schema, uiWidget) {
// Note: uiWidget can be undefined, a string or an object; we only deal with
// the inline option when we're provided a definition object.
return {
inline: isObject(uiWidget) &&
isObject(uiWidget.options) &&
uiWidget.options.inline,
enumOptions: optionsList(Object.assign({
enumNames: ['true', 'false'],
enum: [true, false]
}, {enumNames: schema.enumNames}))
};
}