UNPKG

@danielkalen/simplybind

Version:

Magically simple, framework-less one-way/two-way data binding for frontend/backend in ~5kb.

25 lines (19 loc) 551 B
import config from '../config' import { hyphenate } from './lang' let warn let formatComponentName if (process.env.NODE_ENV !== 'production') { const hasConsole = typeof console !== 'undefined' warn = (msg, vm) => { if (hasConsole && (!config.silent)) { console.error('[Vue warn]: ' + msg + (vm ? formatComponentName(vm) : '')) } } formatComponentName = vm => { var name = vm._isVue ? vm.$options.name : vm.name return name ? ' (found in component: <' + hyphenate(name) + '>)' : '' } } export { warn }