vue-log
v1.0.0
Published
Shorthand function for logging clean view model data
Downloads
6
Readme
vue-log
Shorthand function for logging clean view model data
Installation
npm install vue-log --save
Usage
const Vue = require('vue');
const VueLog = require('vue-log');
Vue.use(VueLog);
new Vue({
data: function () {
return {
teams: [{
name: 'Liverpool'
}, {
name: 'Arsenal'
}, {
name: 'Chelsea'
}]
}
},
methods: {
consoleLog: function () {
console.log(this.teams);
//=> [ { name: [Getter/Setter] },
//=> { name: [Getter/Setter] },
//=> { name: [Getter/Setter] } ]
},
vueLog: function () {
this.$log(this.teams);
//=> [ { name: 'Liverpool' },
//=> { name: 'Arsenal' },
//=> { name: 'Chelsea' } ]
}
}
});
Related
- meta-ctrl-enter - Trigger Vue methods by pressing cmd+enter, windows+enter or ctrl+enter
License
MIT © Daniel Eckermann