mohsen1 / better-console Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://www.npmjs.com/package/better-console
License: Other
Home Page: https://www.npmjs.com/package/better-console
License: Other
When I was looking for something like this 8 month ago, I couldn't find anything, so I wrote my own library - manakin.
I've just done some testing for the output consistency, and seems the same, though we go about it in very different ways ๐, so for example, I do not use any third-party color library at all.
Also, you do not support global colors override, which I did, in addition to the local usage.
Nicely done though! ๐
Hi, we would like to use this in our project, but we need to be able to cite a license file. I noticed in the package.json that the license is BSD. Any chance you could add a file explicitly stating it ?
Thank you!
The demo snippet in your README.md has console = require('better-console');
but when I tried this I wasn't getting colorful output in my terminal. By adding in the var
keyword in front of this line I did get colored output.
Is it possible to use 'better-console' in each file without having to waste a line in each file requiring it?
it would be great to simply log out the "null" string as that value ... great module by the way
Is this possible?
Thanks
This is kind of obscure, but I wanted to let you know about it regardless. I have a project in which I include your better-console
module for much nicer debugging/output while I work on features in Node. When I convert my code to be used in the browser with browserify, IE9 breaks. If I remove better-console
from my application and re-browserify it, everything works fine.
With better-console@^0.2.4 and [email protected]:
/Users/damiano/Desktop/mvp/node_modules/cli-table/node_modules/colors/colors.js:74
'\033[' + styles[style][1] + 'm';
^^
SyntaxError: Octal literals are not allowed in strict mode.
NodeJS version v12.15.0 v14.18.0.
------------------ log ---------------------------
root@4f133ebe635c:~/my_project# node
Welcome to Node.js v14.18.0.
Type ".help" for more information.
var console = require('better-console');
undefined
console.log("This is a log information");
Uncaught RangeError: Maximum call stack size exceeded
at Object.log (/root/my_project/node_modules/better-console/index.js:22:17)
at Object.log (/root/my_project/node_modules/better-console/index.js:22:17)
at Object.log (/root/my_project/node_modules/better-console/index.js:22:17)
at Object.log (/root/my_project/node_modules/better-console/index.js:22:17)
at Object.log (/root/my_project/node_modules/better-console/index.js:22:17)
at Object.log (/root/my_project/node_modules/better-console/index.js:22:17)
at Object.log (/root/my_project/node_modules/better-console/index.js:22:17)
at Object.log (/root/my_project/node_modules/better-console/index.js:22:17)
at Object.log (/root/my_project/node_modules/better-console/index.js:22:17)
at Object.log (/root/my_project/node_modules/better-console/index.js:22:17)
Please check this code
var myArray=[{a:1,b:2,c:3},{a:1,b:2,c:3,d:4},{k:11,f:22},{a:1,b:2,c:3}]
console.table(myArray)
in browser and in node.
Node output is:
โโโโโโโโโโโฌโโโโโโฌโโโโโโฌโโโโโโ
โ (index) โ a โ b โ c โ
โโโโโโโโโโโผโโโโโโผโโโโโโผโโโโโโค
โ 0 โ 1 โ 2 โ 3 โ
โโโโโโโโโโโผโโโโโโผโโโโโโผโโโโโโค
โ 1 โ 1 โ 2 โ 3 โ 4 โ
โโโโโโโโโโโผโโโโโโผโโโโโโผโโโโโโค
โ 2 โ 11 โ 22 โ
โโโโโโโโโโโผโโโโโโผโโโโโโผโโโโโโค
โ 3 โ 1 โ 2 โ 3 โ
โโโโโโโโโโโดโโโโโโดโโโโโโดโโโโโโ
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.