INNER CODE UNIT · TypeScript

hyphensToUnderscores

tachyons-css/react-native-style-tachyons · src/index.ts:17

const hyphensToUnderscores = (sourceObj: any): any => {
    const translated: any = {}

    /* Create hyphened versions */
    _.forOwn(sourceObj, (val, key) => {
        translated[key.replace(/-/gu, "_")] = val
    })

    return translated
}

const NativeTachyons = {
    wrap: ReactWrapper.wrap,

    /* Placeholder */
    styles: {} as any,

    /* Placeholder */

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…