UNPKG

@modular-forms/react

Version:

The modular and type-safe form library for React

12 lines (11 loc) 319 B
/** * Filters the options object from the arguments and returns it. * * @param arg1 Maybe the options object. * @param arg2 Maybe the options object. * * @returns The options object. */ export function getOptions(arg1, arg2) { return (typeof arg1 !== 'string' && !Array.isArray(arg1) ? arg1 : arg2) || {}; }