Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
bk-awesome-log
Advanced tools
This package will make you fall in love with your console!
In case you already haven't... It was designed for fun, with some learning purpouses in the mind. But, it also provides some functionality, for example you can inspect FormData
without using loop - this package does it for you!
As this package is really simple here is quick referrence how to use it in your project:
Installation
npm install bk-awesome-log
Usage
First you need to import package to your project:
import {BaseLogger} from 'bk-awesome-log'
Then you have to init logger object. If you are using TS, you will get type suggestions as this project was written with TS in mind.
const logger = new BaseLogger({
name: 'Bartosz',
organization: 'Owls Department',
componentName: 'The Menu',
showGreet: true,
}, () => {
// your code...
})
Once you have instance of component you can use following methods:
Log
logger.log("Hello world!");
Warning
logger.warn("Make sure to turn into production mode!");
Error
logger.error("Hey, something went wrong fetching data!");
Available config options:
Option name | Type | Default | Description |
---|---|---|---|
showGreet | boolean | false | Flag that indicates whether you want to show greet message on init. |
name | string | '' | Your name, useful when showGreet is set to true |
organization | string | '' | Your organization name, useful when showGreet is set to true |
componentName | string | '' | Your component name, useful when showGreet is set to true |
onMounted
hook:
You can pass a second parameter to class constructor, that will be called after config initialization. This is similar to lifecycle hooks that you can see in every modern JS framework.
FAQs
Fall in love with your console
The npm package bk-awesome-log receives a total of 5 weekly downloads. As such, bk-awesome-log popularity was classified as not popular.
We found that bk-awesome-log demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.