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

color-loggers

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-loggers - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

.ackrc

4

.prettierrc.js
module.exports = {
...require('gts/.prettierrc.json')
}
...require('eslint-config-alloy/.prettierrc.js'),
};

@@ -17,3 +17,3 @@ "use strict";

})();
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Red = exports.Green = exports.Blue = void 0;

@@ -20,0 +20,0 @@ var Color = /** @class */ (function () {

{
"name": "color-loggers",
"version": "0.2.0",
"license": "MIT",
"name": "color-loggers",
"version": "0.1.3",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"test": "ts-node src/test.ts",
"prepublishOnly": "tsc src/index.ts --declaration --outDir lib"
"lint": "eslint --fix '**/*.{ts,tsx,js,jsx}' && prettier --write . && sort-package-json",
"prepublishOnly": "tsc src/index.ts --declaration --outDir lib",
"test": "ts-node src/test.ts"
},
"devDependencies": {
"@types/node": "^18.14.4",
"gts": "^3.1.1",
"typescript": "^4.9.5",
"@types/node": "^18.15.11",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"eslint": "^8.37.0",
"eslint-config-alloy": "^4.9.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.7",
"sort-package-json": "^2.4.1",
"ts-node": "^10.9.1",
"ttpt": "^0.5.3",
"typescript": "^5.0.3",
"yarn-upgrade-all": "^0.7.2"
}
}

@@ -5,3 +5,2 @@ # color loggers

## Install

@@ -13,7 +12,6 @@

## Use
```ts
import {Blue, Green, Red} from './index';
import { Blue, Green, Red } from 'color-loggers';

@@ -47,3 +45,2 @@ const info = new Blue();

## Dynamic prefix

@@ -50,0 +47,0 @@

type Prefix = string | (() => string);
class Color {
color: string;
prefix: Prefix;
public color: string;
public prefix: Prefix;
constructor(color: string, prefix: Prefix = '') {
public constructor(color: string, prefix: Prefix = '') {
this.color = color;

@@ -12,3 +12,3 @@ this.prefix = prefix;

log(message: string) {
public log(message: string) {
let prefix = this.prefix;

@@ -23,3 +23,3 @@ if (prefix instanceof Function) {

export class Blue extends Color {
constructor(prefix: Prefix = '[Info]:') {
public constructor(prefix: Prefix = '[Info]:') {
super('\x1b[34m', prefix);

@@ -30,3 +30,3 @@ }

export class Green extends Color {
constructor(prefix: Prefix = '[Done]:') {
public constructor(prefix: Prefix = '[Done]:') {
super('\x1b[32m', prefix);

@@ -37,5 +37,5 @@ }

export class Red extends Color {
constructor(prefix: Prefix = '[Error]:') {
public constructor(prefix: Prefix = '[Error]:') {
super('\x1b[31m', prefix);
}
}

@@ -1,2 +0,2 @@

import {Blue, Green, Red} from './index';
import { Blue, Green, Red } from './index';

@@ -3,0 +3,0 @@ const info = new Blue();

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