UNPKG

king

Version:

A powerful server infrastructure management platform - "The King of your Nodes"

37 lines (28 loc) 732 B
// Generated by CoffeeScript 1.6.3 var Base; module.exports = Base = (function() { Base.prototype.name = 'Base'; function Base() { this.log('init base'); } Base.prototype.toString = function() { if (this.id) { return "" + this.name + " (" + this.id + ")"; } else { return this.name; } }; Base.prototype.consargs = function(a) { var args; args = Array.prototype.slice.call(a); args.unshift(this.toString() + ':'); return args; }; Base.prototype.log = function() { return console.log.apply(console, this.consargs(arguments)); }; Base.prototype.error = function() { return console.error.apply(console, this.consargs(arguments)); }; return Base; })();