export * from './event-utils'
export * from './random'

/**
 * Replace camelCase with dashed-space
 *
 * @export
 * @param {string} str
 * @returns {string}
 */
export const dasherize = (str: string): string =>
    str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`)

export const flatten = (arr: any[]): any[] =>
    arr.reduce(
        (acc: any[], itm: any) => acc.concat(itm),
        [],
    )
