How to use the hyperflow.Hf.fallback function in hyperflow

To help you get started, we’ve selected a few hyperflow examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tuantle / hypertoxin / src / components / images / wallpaper-image-component.ios.js View on Github external
pureRender: function pureRender (property) {
        const {
            resizeMode,
            source,
            defaultSource,
            style,
            children
        } = Hf.fallback({
            resizeMode: `cover`
        }).of(property);
        let adjustedStyle = DEFAULT_WALLPAPER_IMAGE_STYLE;

        adjustedStyle = Hf.isObject(style) ? Hf.merge(adjustedStyle).with(style) : adjustedStyle;

        return (
github tuantle / hypertoxin / src / applets / fields / domains / email-field-domain.js View on Github external
domain.incoming(EVENT.ON.UPDATE_FIELD_INPUT_VALIDATION).handle((validator) => {
            const {
                value,
                validate
            } = validator;
            const {
                validated,
                status
            } = Hf.fallback({
                validated: false,
                status: ``
            }).of(validate(value));

            return {
                validated,
                status
            };
        }).relay(EVENT.DO.MUTATE_FIELD_INPUT_VALIDATION);
github tuantle / hypertoxin / src / components / divider / divider-component.ios.js View on Github external
pureRender: function pureRender (property) {
        const {
            thickness,
            style
        } = Hf.fallback({
            thickness: 1
        }).of(property);
        let adjustedStyle = Hf.merge(DEFAULT_DIVIDER_VIEW_STYLE).with({
            container: {
                height: thickness
            }
        });

        adjustedStyle = Hf.isObject(style) ? Hf.merge(adjustedStyle).with(style) : adjustedStyle;

        return (
github tuantle / hypertoxin / src / components / views / screen-view-component.ios.js View on Github external
pureRender: function pureRender (property) {
        const {
            shade,
            style,
            children
        } = Hf.fallback({
            shade: `light`
        }).of(property);
        let adjustedStyle = Hf.merge(DEFAULT_SCREEN_VIEW_STYLE).with({
            container: {
                backgroundColor: Ht.Theme.color.body.container[shade]
            }
        });

        adjustedStyle = Hf.isObject(style) ? Hf.merge(adjustedStyle).with(style) : adjustedStyle;

        return (
github tuantle / hypertoxin / src / applets / fields / domains / phone-number-field-domain.js View on Github external
domain.incoming(EVENT.ON.UPDATE_FIELD_INPUT_VALIDATION).handle((validator) => {
            const {
                value,
                validate
            } = validator;
            const {
                validated,
                status
            } = Hf.fallback({
                validated: false,
                status: ``
            }).of(validate(value));

            return {
                validated,
                status
            };
        }).relay(EVENT.DO.MUTATE_FIELD_INPUT_VALIDATION);

hyperflow

A javascript state flow and mutation management toolkit & library for developing universal app.

MIT
Latest version published 5 years ago

Package Health Score

42 / 100
Full package analysis