/**
 * Small shared helpers ported from the source design system's kernel.
 * Only what the UI library actually uses lives here.
 */

/**
 * Loose boolean coercion — treats "true", true and "1" as true.
 *
 * @param {boolean|string} val Value to coerce.
 * @return {boolean} Coerced boolean.
 */
export const toBoolean = ( val ) =>
	val === 'true' || val === true || val === '1';
