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

@zodash/logger

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zodash/logger - npm Package Compare versions

Comparing version 0.2.15 to 0.2.16

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [0.2.16](https://github.com/zcorky/zodash/compare/@zodash/logger@0.2.15...@zodash/logger@0.2.16) (2021-05-03)
**Note:** Version bump only for package @zodash/logger
## [0.2.15](https://github.com/zcorky/zodash/compare/@zodash/logger@0.2.14...@zodash/logger@0.2.15) (2021-03-25)

@@ -8,0 +16,0 @@

31

lib/logger.js
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -69,15 +60,15 @@ exports.getLogger = exports.Logger = exports.LogLevel = void 0;

useDefaulEngine() {
return (ctx, next) => __awaiter(this, void 0, void 0, function* () {
return async (ctx, next) => {
ctx.input.engine = console;
yield next();
});
await next();
};
}
useDateTime() {
return (ctx, next) => __awaiter(this, void 0, void 0, function* () {
return async (ctx, next) => {
ctx.input.datetime = moment_1.moment();
yield next();
});
await next();
};
}
useDisable() {
return (ctx, next) => __awaiter(this, void 0, void 0, function* () {
return async (_ctx, next) => {
const enable = !Logger._disableFn ? true : !Logger._disableFn();

@@ -87,7 +78,7 @@ if (!enable) {

}
yield next();
});
await next();
};
}
handle() {
return (ctx) => __awaiter(this, void 0, void 0, function* () {
return async (ctx) => {
const { input } = ctx;

@@ -138,3 +129,3 @@ if (this.options.console === false) {

}
});
};
}

@@ -141,0 +132,0 @@ log(message, ...args) {

{
"name": "@zodash/logger",
"version": "0.2.15",
"version": "0.2.16",
"description": "simple logger model",

@@ -71,3 +71,3 @@ "keywords": [

},
"gitHead": "bd85904bdf3094ed8d65df0fa57c695c74d4dc87"
"gitHead": "904ffa5f78d9aae6d39c9946cf5c36c7a4bcb60b"
}
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