File: js/vue/src/util/debug.js

Recommend this page to a friend!
  Classes of Sergey Beskorovayniy   Vue Resume   js/vue/src/util/debug.js   Download  
File: js/vue/src/util/debug.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Vue Resume
Build reactive Web user interfaces
Author: By
Last change:
Date: 7 years ago
Size: 551 bytes
 

Contents

Class file image Download
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 }