Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A library with no dependencies to handle and amplify the use of console.log and other forms of debugging

License

NotificationsYou must be signed in to change notification settings

vacom/logbook

Repository files navigation

A simple library with no dependencies, which uses console.log but better looks and functionality in a simple API

Logbook

Installation

Just install the dependency and start using

npmi @vacom/logbookoryarnadd @vacom/logbook

How to import

After installing the dependency, just import the components you need

importLogfrom"@vacom/logbook";

Usage

importLogfrom"@vacom/logbook";//Simple usage//args: ValueLog.info("Any value, object or data type");/** STYLES **///args: Title, Value, ColorLog.color("title","value","#2274A5");/** STATES **///args: ValueLog.warn("This is a warning");Log.error("This is a error");Log.success("This is a success");Log.time("This is a time log");/** DATA **///Table//args: Value: ArrayLog.table([{id:1,name:"john"},{id:2,name:"Jack"}]);//Simple GroupLog.group.title("A group").child("Child").end();//Nested GroupLog.group.title("A group").child("Child").title("Nested group").child("nested child").end().end();/** SEQUENCE **///Trace//show how the code ended up at a certain point//args: ValueLog.trace("trace");//Assert//args: Condition, Value//Write a message to the console, only if the first argument is _false_Log.assert(document.getElementById("demo"),"You have no element with ID 'demo'");//Countfor(i=0;i<10;i++){Log.count();}/** UTILITIES **/Log.clear();//Clears everything in the console

License

MIT ©vacom

About

A library with no dependencies to handle and amplify the use of console.log and other forms of debugging

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp