dist/shards-vue.umd.js
function parseBindings(bindings) {
        var config = {};

        switch (typeof bindings.value) {
            case 'string':
            case 'function':
                config.title = bindings.value;
                break
            case 'object':
                config = Object.assign({}, bindings.value);
        }

        // Parse args (eg: v-d-tooltip:my-container)
        if (bindings.arg) {
            config.container = "#" + (bindings.arg); // #my-container
        }

        // Parse modifiers. eg: v-d-tooltip.my-modifier
        Object.keys(bindings.modifiers).forEach(function (mod) {
            // Parse if the title allows HTML
            if (/^html$/.test(mod)) {
                config.html = true;

            // Parse animation
            } else if (/^nofade$/.test(mod)) {
                config.animation = false;

            // Parse placement
            } else if (/^(auto|top(left|right)?|bottom(left|right)?|left(top|bottom)?|right(top|bottom)?)$/.test(mod)) {
                config.placement = mod;

            // Parse boundary
            } else if (/^(window|viewport)$/.test(mod)) {
                config.boundary = mod;

            // Parse delay
            } else if (/^d\d+$/.test(mod)) {
                var delay = parseInt(mod.slice(1), 10) || 0;
                if (delay) {
                    config.delay = delay;
                }

            // Parse offset
            }  else if (/^o-?\d+$/.test(mod)) {
                var offset = parseInt(mod.slice(1), 10) || 0;
                if (offset) {
                    config.offset = offset;
                }
            }
        });

        // Parse selected triggers.
        var selectedTriggers = {};
        var triggers = typeof config.trigger === 'string' ? config.trigger.trim().split(/\s+/) : [];

        triggers.forEach(function (trigger) {
            if (validTriggers[trigger]) {
                selectedTriggers[trigger] = true;
            }
        });

        // Parse trigger modifiers. eg: v-d-tooltip.click
        Object.keys(validTriggers).forEach(function (trigger) {
            if (bindings.modifiers[trigger]) {
                selectedTriggers[trigger] = true;
            }
        });

        config.trigger = Object.keys(selectedTriggers).join(' ');

        // Convert `blur` to `focus`
        if (config.trigger === 'blur') {
            config.trigger = 'focus';
        }

        // If there's no trigger assigned, just delete the key.
        if (!config.trigger) {
            delete config.trigger;
        }

        return config
    }
function parseBindings(bindings) {
        var config = {};

        switch (typeof bindings.value) {
            case 'string':
            case 'function':
                config.title = bindings.value;
                break
            case 'object':
                config = Object.assign({}, bindings.value);
        }

        // Parse args (eg: v-d-tooltip:my-container)
        if (bindings.arg) {
            config.container = "#" + (bindings.arg); // #my-container
        }

        // Parse modifiers. eg: v-d-tooltip.my-modifier
        Object.keys(bindings.modifiers).forEach(function (mod) {
            // Parse if the title allows HTML
            if (/^html$/.test(mod)) {
                config.html = true;

            // Parse animation
            } else if (/^nofade$/.test(mod)) {
                config.animation = false;

            // Parse placement
            } else if (/^(auto|top(left|right)?|bottom(left|right)?|left(top|bottom)?|right(top|bottom)?)$/.test(mod)) {
                config.placement = mod;

            // Parse boundary
            } else if (/^(window|viewport)$/.test(mod)) {
                config.boundary = mod;

            // Parse delay
            } else if (/^d\d+$/.test(mod)) {
                var delay = parseInt(mod.slice(1), 10) || 0;
                if (delay) {
                    config.delay = delay;
                }

            // Parse offset
            }  else if (/^o-?\d+$/.test(mod)) {
                var offset = parseInt(mod.slice(1), 10) || 0;
                if (offset) {
                    config.offset = offset;
                }
            }
        });

        // Parse selected triggers.
        var selectedTriggers = {};
        var triggers = typeof config.trigger === 'string' ? config.trigger.trim().split(/\s+/) : [];

        triggers.forEach(function (trigger) {
            if (validTriggers[trigger]) {
                selectedTriggers[trigger] = true;
            }
        });

        // Parse trigger modifiers. eg: v-d-tooltip.click
        Object.keys(validTriggers).forEach(function (trigger) {
            if (bindings.modifiers[trigger]) {
                selectedTriggers[trigger] = true;
            }
        });

        config.trigger = Object.keys(selectedTriggers).join(' ');

        // Convert `blur` to `focus`
        if (config.trigger === 'blur') {
            config.trigger = 'focus';
        }

        // If there's no trigger assigned, just delete the key.
        if (!config.trigger) {
            delete config.trigger;
        }

        return config
    }
function parseBindings ( bindings ) { var config = { } ; switch ( typeof bindings . value ) { case 'string' : case 'function' : config . title = bindings . value ; break case 'object' : config = Object . assign ( { } , bindings . value ) ; } // Parse args (eg: v-d-tooltip:my-container) if ( bindings . arg ) { config . container = "#" + ( bindings . arg ) ; // #my-container } // Parse modifiers. eg: v-d-tooltip.my-modifier Object . keys ( bindings . modifiers ) . forEach ( function ( mod ) { // Parse if the title allows HTML if ( / ^html$ / . test ( mod ) ) { config . html = true ; // Parse animation } else if ( / ^nofade$ / . test ( mod ) ) { config . animation = false ; // Parse placement } else if ( / ^(auto|top(left|right)?|bottom(left|right)?|left(top|bottom)?|right(top|bottom)?)$ / . test ( mod ) ) { config . placement = mod ; // Parse boundary } else if ( / ^(window|viewport)$ / . test ( mod ) ) { config . boundary = mod ; // Parse delay } else if ( / ^d\d+$ / . test ( mod ) ) { var delay = parseInt ( mod . slice ( 1 ) , 10 ) || 0 ; if ( delay ) { config . delay = delay ; } // Parse offset } else if ( / ^o-?\d+$ / . test ( mod ) ) { var offset = parseInt ( mod . slice ( 1 ) , 10 ) || 0 ; if ( offset ) { config . offset = offset ; } } } ) ; // Parse selected triggers. var selectedTriggers = { } ; var triggers = typeof config . trigger === 'string' ? config . trigger . trim ( ) . split ( / \s+ / ) : [ ] ; triggers . forEach ( function ( trigger ) { if ( validTriggers [ trigger ] ) { selectedTriggers [ trigger ] = true ; } } ) ; // Parse trigger modifiers. eg: v-d-tooltip.click Object . keys ( validTriggers ) . forEach ( function ( trigger ) { if ( bindings . modifiers [ trigger ] ) { selectedTriggers [ trigger ] = true ; } } ) ; config . trigger = Object . keys ( selectedTriggers ) . join ( ' ' ) ; // Convert `blur` to `focus` if ( config . trigger === 'blur' ) { config . trigger = 'focus' ; } // If there's no trigger assigned, just delete the key. if ( ! config . trigger ) { delete config . trigger ; } return config }
Bindings parser.
Bindings parser .