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

log-debug

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

log-debug - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

40

index.ts

@@ -5,5 +5,21 @@ require('source-map-support').install();

var util = require('util');
var colors = require('colors/safe');
let util = require('util');
let colors = require('colors/safe');
interface ILoggerRepporting {
info?: boolean;
debug?: boolean;
trace?: boolean;
error?: boolean;
warn?: boolean;
}
interface ILoggerOptions {
noColors?: boolean;
printDate?: boolean;
stderr?: WritableStream;
stdout?: WritableStream;
repporting?: ILoggerRepporting
}
const LOG_COLORS = {

@@ -79,3 +95,3 @@ INFO: 'blue',

if (typeof (<any>options).write === "function") {
let stdout = <WritableStream> options;
let stdout: WritableStream = <WritableStream> options;
this.setStdout(stdout);

@@ -255,12 +271,12 @@ } else {

let date = '';
let date: string = '';
if (this.printDate) {
let currentDate = new Date();
let year = currentDate.getFullYear();
let month = ('0' + (currentDate.getMonth()+1)).slice(-2);
let day = ('0' + (currentDate.getDate())).slice(-2);
let hours = ('0' + (currentDate.getHours())).slice(-2);
let minutes = ('0' + (currentDate.getMinutes())).slice(-2);
let seconds = ('0' + (currentDate.getSeconds())).slice(-2);
let currentDate: Date = new Date();
let year: number = currentDate.getFullYear();
let month: string = ('0' + (currentDate.getMonth()+1)).slice(-2);
let day: string = ('0' + (currentDate.getDate())).slice(-2);
let hours: string = ('0' + (currentDate.getHours())).slice(-2);
let minutes: string = ('0' + (currentDate.getMinutes())).slice(-2);
let seconds: string = ('0' + (currentDate.getSeconds())).slice(-2);

@@ -412,4 +428,4 @@ date = `[${year}-${month}-${day} ${hours}:${minutes}:${seconds}]`;

let $log = new Logger();
let $log: Logger = new Logger();
export = $log;
$log.Logger = Logger;
{
"name": "log-debug",
"version": "1.1.5",
"version": "1.1.6",
"description": "Provide logger written in TypeScript for TypeScript or JavaScript.",
"main": "index.js",
"scripts": {
"tsc": "tsc",
"preinstall": "typings install",

@@ -32,3 +33,3 @@ "postinstall": "tsc",

"mocha": "^2.4.5",
"typescript": "^1.7.5"
"typescript": "^1.8.10"
},

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

{
"ambientDependencies": {
"chai": "github:DefinitelyTyped/DefinitelyTyped/chai/chai.d.ts#9c25433c84251bfe72bf0030a95edbbb2c81c9d5",
"mocha": "github:DefinitelyTyped/DefinitelyTyped/mocha/mocha.d.ts#d6dd320291705694ba8e1a79497a908e9f5e6617",
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts#aee0039a2d6686ec78352125010ebb38a7a7d743"
"globalDependencies": {
"mocha": "registry:dt/mocha#2.2.5+20160317120654",
"node": "registry:dt/node#6.0.0+20160514165920"
},
"dependencies": {
"chai": "registry:npm/chai#3.5.0+20160415060238"
}
}
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