1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-07-08 09:24:25 +03:00
ifhub.club/application/frontend/skin/developer/components/ls-core/dev.js
Denis Shakhov 42321428f8 Компоненты ls-core и ls-vendor
* Перенесены либы из фреймворка
2014-10-24 20:26:11 +07:00

49 lines
1,006 B
JavaScript

/**
* Модуль вспомогательных функций для разработчика
*
* @module ls/dev
*
* @license GNU General Public License, version 2
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
* @author Denis Shakhov <denis.shakhov@gmail.com>
*/
var ls = ls || {};
ls.dev = (function ($) {
/**
* Дефолтные опции
*
* @private
*/
var _defaults = { };
/**
* Инициализация
*
* @param {Object} options Опции
*/
this.init = function (options) {
this.options = $.extend({}, _defaults, options);
};
/**
* Дебаг сообщений
*/
this.debug = function() {
if ( ls.options.production ) return;
this.log.apply(this, arguments);
};
/**
* Лог сообщений
*/
this.log = function() {
if ( window.console && window.console.log ) {
Function.prototype.bind.call(console.log, console).apply(console, arguments);
}
};
return this;
}).call(ls.dev || {}, jQuery);