3131 <a href =" https://travis-ci.org/BlackB1RD-Development/tools-kit " >
3232 <img src="https://travis-ci.org/BlackB1RD-Development/tools-kit.svg?branch=master" alt="Build" />
3333 </a >
34+ <a href =" https://app.fossa.com/projects/git%2Bgithub.com%2FBlackB1RD-Development%2Ftools-kit?ref=badge_shield " alt =" FOSSA Status " >
35+ <img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2FBlackB1RD-Development%2Ftools-kit.svg?type=shield"/>
36+ </a >
3437 <a href =" https://github.com/BlackB1RD-Development/tools-kit " >
3538 <img src="https://img.shields.io/badge/code_style-XO-5ed9c7.svg" alt="Code Style" />
3639 </a >
4245 <sub >© <a href =" https://www.npmjs.com/package/tools-kit " >Tools-Kit</a > By <a href =" https://github.com/BlackB1RD-Development " >BlackB1RD-Development</a > (<b ><a href =" https://github.com/RealBlackB1RD " >@RealBlackB1RD </a ></b >). All rights reserved ©</sub >
4346</p >
4447
45- ## Features
48+ # Features
4649
4750- A [ ** Hastebin** ] [ hastebin ] Client that can publish your beautiful code online or fetching an existing one.
4851- A Logger Manager that can style your logs with all the known Node.js console methods.
5154- Extremely configurable and debuggable.
5255- Well documented.
5356
54- ## Installation
57+ # Installation
5558
5659``` console
5760npm install tools-kit
5861```
5962
60- ## Class Examples
63+ # Class Examples
6164
6265Click to jump between class examples:
6366
64- | Class Name | Class Description |
65- | --------------- | ------------------------------------------------------------------------------ |
66- | [ Hastebin Client] ( #tools-kit-hastebin-client ) | Post and fetch code easily from [ ** Hastebin** ] [ hastebin ] |
67- | [ Logger] ( #tools-kit-logger-manager ) | Log a styled and colored text into the console |
68- | [ Color] ( #tools-kit-color-manager ) | Transfer your simple text into a styled and modern one (Console support only) |
69- | [ Util] ( #tools-kit-utilities ) | A collection of functions that everyone use in one simple line |
67+ | Class Name | Class Description |
68+ | --------------- | ------------------------------------------------------------------------------ |
69+ | [ ** Hastebin Client** ] ( #tools-kit-hastebin-client ) | Post and fetch code easily from [ ** Hastebin** ] [ hastebin ] |
70+ | [ ** Logger** ] ( #tools-kit-logger-manager ) | Log a styled and colored text into the console |
71+ | [ ** Color** ] ( #tools-kit-color-manager ) | Transfer your simple text into a styled and modern one (Console support only) |
72+ | [ ** Util** ] ( #tools-kit-utilities ) | A collection of functions that everyone use in one simple line |
7073
71- ## Tools-Kit Hastebin Client
74+ ## Hastebin Client
7275
7376With Tools-Kit [ ** Hastebin** ] [ hastebin ] Client you can post and fetch code easily from [ ** Hastebin** ] [ hastebin ] .
7477
@@ -96,10 +99,9 @@ hastebin.post('var test = \'test\';\n\nconsole.log(test);', '.js')
9699 });
97100```
98101
99- ## Tools-Kit Logger Manager
102+ ## Logger Manager
100103
101104With Tools-Kit Logger Manager you can log a styled and colored text into the console with pre made logging settings in each method.
102- See more backgrounds, colors, styles & consoles types by clicking [ here] ( #logger-options )
103105
104106``` javascript
105107const { logger } = require (' tools-kit' );
@@ -113,18 +115,18 @@ logger.important('Important log');
113115logger .success (' Success log' );
114116// Console > [20/02/2020 - 00:00:00 | SUCCESS]: Success log
115117
116- logger .debug (' Debugging log' );
117- // Console > [20/02/2020 - 00:00:00 | DEBUG]: Debugging log
118-
119- logger .error (' Error log' );
120- // Console > [20/02/2020 - 00:00:00 | ERROR]: Error log
121-
122118logger .fatal (' Fatal log' );
123119// Console > [20/02/2020 - 00:00:00 | FATAL]: Fatal log
124120
125121logger .trace (' Trace log' );
126122// Console > [20/02/2020 - 00:00:00 | TRACE]: Trace log
127123
124+ logger .error (' Error log' );
125+ // Console > [20/02/2020 - 00:00:00 | ERROR]: Error log
126+
127+ logger .debug (' Debug log' );
128+ // Console > [20/02/2020 - 00:00:00 | DEBUG]: Debugging log
129+
128130logger .info (' Information log' );
129131// Console > [20/02/2020 - 00:00:00 | INFO]: Information log
130132
@@ -153,9 +155,9 @@ Settings custom styling options:
153155``` javascript
154156const { logger } = require (' tools-kit' );
155157
156- const settings = { // Support custom log options
158+ const settings = { // Support custom logging options
157159 background: ' black' ,
158- color: ' blue ' ,
160+ color: ' bMagenta ' ,
159161 style: ' bold' ,
160162 type: ' info' ,
161163 time: true ,
@@ -191,7 +193,9 @@ logger // Support chain logging
191193*/
192194```
193195
194- ## Tools-Kit Color Manager
196+ See more backgrounds, colors, styles & consoles types by clicking [ ** here** ] ( #logger-options )
197+
198+ ## Color Manager
195199
196200With Tools-Kit Color Manager you can transfer your simple text into a styled and modern one.
197201
@@ -224,30 +228,63 @@ logger.log({ tag: 'ZEBRA' }, color.zebra('zebra styled-text'), 'normal text');
224228// Console > [20/02/2020 - 00:00:00 | ZEBRA]: zebra styled-text zebra styled-text normal text
225229```
226230
227- ## Tools-Kit Utilities
231+ ## Utilities
228232
229233With Tools-Kit Utilities you can use the functions that everyone uses in one simple line.
230234
231235``` javascript
232236const { logger , util } = require (' tools-kit' );
233237
234- logger .log ({ tag: ' OBJECT?' }, util .isObject (new Array ()));
235- // Console > [20/02/2020 - 00:00:00 | OBJECT?]: false
238+ logger .log ({ tag: ' HAS?' }, util .has ({ name: ' test' }, ' name' ));
239+ // Console > [20/02/2020 - 00:00:00 | HAS?]: true
240+
241+ logger .log ({ tag: ' HAS?' }, util .has ({ name: ' test' }, ' test' ));
242+ // Console > [20/02/2020 - 00:00:00 | HAS?]: false
243+
244+ logger .log ({ tag: ' HAS?' }, util .has ({ name: ' test' }, ' name' , ' test' ));
245+ // Console > [20/02/2020 - 00:00:00 | HAS?]: true
246+
247+ logger .log ({ tag: ' HAS?' }, util .has ({ name: ' test' }, ' name' , ' not test' ));
248+ // Console > [20/02/2020 - 00:00:00 | HAS?]: false
249+
250+ logger .log ({ tag: ' HAS?' }, util .has ([' name' , ' test' ], ' name' ));
251+ // Console > [20/02/2020 - 00:00:00 | HAS?]: true
252+
253+ logger .log ({ tag: ' HAS?' }, util .has ([' test' , ' not test' ], ' name' ));
254+ // Console > [20/02/2020 - 00:00:00 | HAS?]: false
255+
256+ logger .log ({ tag: ' ARRAY?' }, util .isArray (new Array ()));
257+ // Console > [20/02/2020 - 00:00:00 | ARRAY?]: true
258+
259+ logger .log ({ tag: ' ARRAY?' }, util .isArray (new Object ()));
260+ // Console > [20/02/2020 - 00:00:00 | ARRAY?]: false
261+
262+ logger .log ({ tag: ' ARRAY?' }, util .isArray ([]));
263+ // Console > [20/02/2020 - 00:00:00 | ARRAY?]: true
264+
265+ logger .log ({ tag: ' ARRAY?' }, util .isArray ({}));
266+ // Console > [20/02/2020 - 00:00:00 | ARRAY?]: false
236267
237268logger .log ({ tag: ' OBJECT?' }, util .isObject (new Object ()));
238269// Console > [20/02/2020 - 00:00:00 | OBJECT?]: true
239270
240- logger .log ({ tag: ' OBJECT?' }, util .isObject ([] ));
271+ logger .log ({ tag: ' OBJECT?' }, util .isObject (new Array () ));
241272// Console > [20/02/2020 - 00:00:00 | OBJECT?]: false
242273
243274logger .log ({ tag: ' OBJECT?' }, util .isObject ({}));
244275// Console > [20/02/2020 - 00:00:00 | OBJECT?]: true
245276
277+ logger .log ({ tag: ' OBJECT?' }, util .isObject ([]));
278+ // Console > [20/02/2020 - 00:00:00 | OBJECT?]: false
279+
246280logger .log ({ tag: ' RANDOM ITEM' }, util .randomItem ([' cat' , ' dog' , ' fish' ]));
247- // Console > [20/02/2020 - 00:00:00 | OBJECT? ]: dog
281+ // Console > [20/02/2020 - 00:00:00 | RANDOM ITEM ]: dog
248282
249283logger .log ({ tag: ' RANDOM NUMBER' }, util .randomNumber (5 , 10 ));
250- // Console > [20/02/2020 - 00:00:00 | OBJECT?]: 7
284+ // Console > [20/02/2020 - 00:00:00 | RANDOM ITEM]: 7
285+
286+ logger .log ({ tag: ' RANDOM NUMBER' }, util .randomNumber (5 , 10 , false )); // Default is true
287+ // Console > [20/02/2020 - 00:00:00 | RANDOM ITEM]: 9.051817302079687
251288```
252289
253290## Logger Options
@@ -314,41 +351,42 @@ logger.log({ tag: 'RANDOM NUMBER' }, util.randomNumber(5, 10));
314351
315352### options.time
316353
317- - The ` options.time ` can be either of this two:
318- - ` Boolean ` (true/false) - If to include the current time with the stock format when logging
319- - ` String ` ([ moment] [ moment ] time format) - A custom moment time format to use when logging
354+ #### The ` options.time ` can be either of this two
355+
356+ - ` Boolean ` (true/false) - If to include the current time and date with the stock format when logging (Stock used [ ** moment** ] [ moment ] format: DD/M/YYYY - H:mm: ss )
357+ - ` String ` - A custom [ ** moment** ] [ moment ] time format to use when logging
320358
321359### options.tag
322360
323- - The ` options.tag ` can be either of this two:
361+ #### The ` options.tag ` can be either of this two
362+
324363- ` Boolean ` (true/false) - If to include the a tag when logging
325- - ` String ` - A custom string value to use as a tag when logging
364+ - ` String ` - A custom string value to use as a tag when logging (Case sensitive)
326365
327- ## License
366+ # Documentations
328367
329- [ ** MIT ** ] [ license ]
368+ Read the [ ** Documentations ** ] [ documentations ] for more information about each method.
330369
331- ## Changelog
370+ # Maintainers
332371
333- See the [ ** Changes Log** ] [ changelog ] for more information about each update.
372+ - [ ** BlackB1RD** ] [ blackb1rd ]
373+ - [ ** JamesParkDev** ] [ james ]
334374
335- ## Documentations
375+ # Changelog
336376
337- Read the [ ** Documentations ** ] [ documentations ] for more information about each method .
377+ See the [ ** Changes Log ** ] [ changelog ] for more information about each update .
338378
339- ## Related Modules
379+ # License
340380
341- - [ node-fetch] [ node-fetch ] — A light-weight module that brings window.fetch to Node.js.
342- - [ moment] [ moment ] — A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
343- - [ figlet] [ figlet ] — Creates ASCII Art from text. A full implementation of the FIGfont spec.
381+ [ ![ FOSSA Status] ( https://app.fossa.io/api/projects/git%2Bgithub.com%2FBlackB1RD-Development%2Ftools-kit.svg?type=large )] ( https://app.fossa.io/projects/git%2Bgithub.com%2FBlackB1RD-Development%2Ftools-kit?ref=badge_large )
344382
345- ## Maintainers
383+ # Related Modules
346384
347- - [ BlackB1RD] [ blackb1rd ]
348- - [ JamesParkDev] [ james ]
385+ - [ ** node-fetch** ] [ node-fetch ] — A light-weight module that brings window.fetch to Node.js.
386+ - [ ** moment** ] [ moment ] — A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
387+ - [ ** figlet** ] [ figlet ] — Creates ASCII Art from text. A full implementation of the FIGfont spec.
349388
350389[ hastebin ] :https://hastebin.com/about.md
351- [ license ] :https://github.com/BlackB1RD-Development/tools-kit/blob/master/LICENSE.md
352390[ changelog ] :https://github.com/BlackB1RD-Development/tools-kit/blob/master/CHANGELOG.md
353391[ documentations ] :https://tools-kit.js.org/api
354392[ node-fetch ] : https://www.npmjs.com/package/node-fetch
0 commit comments