Installations
npm install nclr
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>= 7.0.0
Node Version
13.12.0
NPM Version
6.14.3
Score
68.9
Supply Chain
99.4
Quality
75.8
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (99.19%)
Shell (0.81%)
Developer
Berkmann18
Download Statistics
Total Downloads
14,011
Last Day
6
Last Week
14
Last Month
37
Last Year
463
GitHub Statistics
1,145 Commits
2 Forks
3 Watching
9 Branches
4 Contributors
Package Meta Information
Latest Version
2.2.5
Package Id
nclr@2.2.5
Unpacked Size
119.10 kB
Size
31.63 kB
File Count
33
NPM Version
6.14.3
Node Version
13.12.0
Total Downloads
Cumulative downloads
Total Downloads
14,011
Last day
500%
6
Compared to previous day
Last week
27.3%
14
Compared to previous week
Last month
-42.2%
37
Compared to previous month
Last year
-36.8%
463
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
21
nclr
Mini NPM package with coloured log functions and more.
Contributions
Please refer to the contribution guideline.
Contributors
Maximilian Berkmann 🐛 💻 📖 🤔 💬 👀 🛡️ ⚠️ | Dependabot 🔧 | Semantic Release Bot 📖 📦 | Codacy Badger 📖 |
---|
Documentation
Table of Contents
index
Set of functions for coloured logs.
Parameters
data
...any
error
- See: log
Print an error.
Parameters
data
...any Data to print
Examples
1error('Something wrong happened with', new Error(this));
Returns boolean Did it happened?
info
- See: log
Print an information.
Parameters
data
...any Data to print
Examples
1info('Welcome John');
Returns boolean Did it happened?
dbg
- See: log
Print a debug message.
Parameters
data
...any Data to print
Examples
1dbg('i=', i);
Returns boolean Did it happened?
out
- See: log
Print an output.
Parameters
data
...any Data to print
Examples
1out(`1 + 1 = ${rpc('1 1 +')}`);
Returns boolean Did it happened?
inp
- See: log
Print an input.
Parameters
data
...any Data to print
Examples
1inp(name);
Returns boolean Did it happened?
warn
- See: log
Print a warning.
Parameters
data
...any Data to print
Examples
1warn('The following function is deprecated');
Returns boolean Did it happened?
quest
- See: log
Print a question.
Parameters
data
...any Data to print
Examples
1quest('What is your username?');
Returns boolean Did it happened?
succ
- See: log
Print a success log.
Parameters
data
...any Data to print
Examples
1succ('Achievement unlocked');
Returns boolean Did it happened?
extend
Extend the current theme.
Parameters
Examples
Using extensions as methods:
1const nclr = require('nclr'); 2nclr.extend({ 3 suc: ['green', 'underline'], 4 data: 'magenta' 5}); 6nclr.suc('Yay!'); 7nclr.data(42);
Using extensions as functions:
1const nclr = require('nclr'); 2nclr.extend({ 3 suc: ['green', 'underline'], 4 data: 'magenta' 5}); 6const { suc, data } = nclr; 7suc('Yay!'); 8data(42);
- Throws Error Invalid extension key
clr
CLI colours.
clr
Colour/style theme for the CLI.
Type: {inp: string, out: Array<string>, info: string, error: string, warn: string, dbg: string, quest: string}
lib
Set of library functions for nclr.
log
STDOUT log.
Parameters
data
any Data to print
Examples
1log('Lorem ipsum dolore sit amet');
Returns boolean Did it happened?
use
Colourise something.
Parameters
name
string Name of the log in the themedata
...any Data
Examples
1let information = use('info', 'Some info styled text');
Nesting
1log('Something', use('warn', 'really ', use('info', 'cool!')));
- Throws Error Invalid name
Returns string Coloured output
restoreTheme
Restore the default fields of the theme.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: npmCommand not pinned by hash: .husky/post-merge:4
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Reason
11 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx
Score
1.6
/10
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More