New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ptz-log

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ptz-log

Awesome log for javascript

latest
Source
npmnpm
Version
1.2.1
Version published
Weekly downloads
27
-27.03%
Maintainers
2
Weekly downloads
 
Created
Source

ptz-log

Build Status NPM codecov.io Dependency Status bitHound Score MIT license

Awesome log and types for javascript and typescript!

Translations

pt-br en-us

Use

Install

    npm install --save ptz-log

How to use

    import log from 'ptz-log';

    log('hi');
    // Colors are optional
    log({ ptzColorLog: 'red' }, 'welcome',
        { ptzColorLog: 'yellow' }, 'to',
        { ptzColorLog: 'green' }, 'polutz!');

How to use Ilog type as dependency injection, and provide your custom logs

    import { Ilog, log } from 'ptz-log';

    const myLog: Ilog = function (...args) {
        console.log('From my custom logging:', ...args);
    }

    class Test {
        log: Ilog;

        constructor({ log: Ilog }) {
            this.log = log;
        }

        testing() {
            log('returning true!');
            return true;
        }
    }

    const test = new Test({ log: myLog });
    test.testing();

Contribute

NPM Global packages

    npm install -g ts-node babel-cli

Setup

    npm install   

Test

    npm test

FAQs

Package last updated on 24 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts