Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bellman

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bellman - npm Package Compare versions

Comparing version 1.0.11 to 1.1.0

7

package.json
{
"name": "bellman",
"version": "1.0.11",
"version": "1.1.0",
"description": "pretty console logger",

@@ -11,3 +11,3 @@ "main": "src-build/index.js",

"build": "npm run build-src && npm run build-test-project",
"test-project": "node test-project-build",
"test-project": "DEBUG=debug* node test-project-build",
"test": "npm run build && npm run test-project"

@@ -32,3 +32,4 @@ },

"lodash": "^3.10.1",
"moment": "^2.10.6"
"moment": "^2.10.6",
"simple-debugger": "^1.0.3"
},

@@ -35,0 +36,0 @@ "devDependencies": {

@@ -48,2 +48,9 @@ # bellman

### Events
* `log` - агрументы события:
* `level` - Имя уровня логирования, соответствует имени логирующего метода
* `caller` - Имя файла и номер строки на которой был вызван логирующий метод
* `message` - Отфотматированное сообщение
* `args` - Аргументы переданные в логирующий метод, из которых формируется `message`
### Config

@@ -50,0 +57,0 @@ * `timeTmp` - Задает формат `:time` части. Для форматирования используется библиотека [moment](https://github.com/moment/moment).

@@ -1,5 +0,4 @@

'use strict';Object.defineProperty(exports, '__esModule', { value: true });var _createClass = (function () {function defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ('value' in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}return function (Constructor, protoProps, staticProps) {if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;};})();function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _toConsumableArray(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];return arr2;} else {return Array.from(arr);}}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError('Cannot call a class as a function');}}var _chalk = require(
'use strict';Object.defineProperty(exports, '__esModule', { value: true });var _createClass = (function () {function defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ('value' in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}return function (Constructor, protoProps, staticProps) {if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;};})();var _get = function get(_x4, _x5, _x6) {var _again = true;_function: while (_again) {var object = _x4, property = _x5, receiver = _x6;_again = false;if (object === null) object = Function.prototype;var desc = Object.getOwnPropertyDescriptor(object, property);if (desc === undefined) {var parent = Object.getPrototypeOf(object);if (parent === null) {return undefined;} else {_x4 = parent;_x5 = property;_x6 = receiver;_again = true;desc = parent = undefined;continue _function;}} else if ('value' in desc) {return desc.value;} else {var getter = desc.get;if (getter === undefined) {return undefined;}return getter.call(receiver);}}};function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}function _toConsumableArray(arr) {if (Array.isArray(arr)) {for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];return arr2;} else {return Array.from(arr);}}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError('Cannot call a class as a function');}}function _inherits(subClass, superClass) {if (typeof superClass !== 'function' && superClass !== null) {throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;}var _simpleDebugger = require(
'chalk');var _chalk2 = _interopRequireDefault(_chalk);var _moment = require(
'moment');var _moment2 = _interopRequireDefault(_moment);var _path = require(
'simple-debugger');var _path = require(
'path');var _util = require(

@@ -9,8 +8,17 @@ 'util');var _lodash = require(

'lodash');
'lodash');var _events = require(
'events');var _events2 = _interopRequireDefault(_events);var _chalk = require(
'chalk');var _chalk2 = _interopRequireDefault(_chalk);var _moment = require(
'moment');var _moment2 = _interopRequireDefault(_moment);
var pervious = function pervious(value) {return value;};var
Bellman = (function () {
Bellman = (function (_EventEmitter) {_inherits(Bellman, _EventEmitter);
function Bellman() {var _this = this;var opt = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];_classCallCheck(this, Bellman);
_get(Object.getPrototypeOf(Bellman.prototype), 'constructor', this).call(this);
(0, _simpleDebugger.debugEvents)(this);
(0, _simpleDebugger.debugMethods)(this, ['on', 'once', 'emit',
'addListener', 'removeListener']);
this.opt = new BellmanOpt(opt);

@@ -64,2 +72,3 @@ this.callers = ['<unknow>'];

levelLogger(line);
this.emit('log', level, callerPos, message, args);

@@ -154,7 +163,7 @@ return this;} }, { key: 'formatValue', value:

function get() {
return (function _(_x4) {var _again = true;_function: while (_again) {var module = _x4;_again = false;
return (function _(_x7) {var _again2 = true;_function2: while (_again2) {var module = _x7;_again2 = false;
if ((0, _lodash.isNull)(module.parent)) {return (
(0, _path.dirname)(module.filename));} else {_x4 =
module.parent;_again = true;continue _function;}}})(
module);} }]);return Bellman;})();exports['default'] = Bellman;var
(0, _path.dirname)(module.filename));} else {_x7 =
module.parent;_again2 = true;continue _function2;}}})(
module);} }]);return Bellman;})(_events2['default']);exports['default'] = Bellman;var

@@ -161,0 +170,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc