Skip to content

{Chalk Logger for objects} Rainbow JSON Stringifier - Recieves an object as an input and then outputs a JSON Stringify where each nested level is a different colour. Great for debugging.

License

mattrichmo/Chalker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chalker

Chalker

Rainbow Logger for Your JSON Objects - Chalk Add-On

Recieves an an object as an argument and it will go through and chalk a new colour for each layer. Great for debugging and visualization.

Optional Args

indentNum \\ the indent number 
startingDepth \\ the starting level to display
maxDepth \\ the number of levels to print
verbose\\ True or False. If true it will print everything. If false (default) it was concatenate strings and arrays

Example:

chalker(testObject, 4, 0, null, true)

Example Output

Example Object

Verbose: Verbose

which is the result of:

Example Code

Add More Colours

Colours are all formatted like this:Example:

    {
        name: 'Almond',
        hex: '#EFDECD',
        complimentary: `#CD9575`,
        shades: {
            dim: {
                name: 'Almond (Dim)',
                hex: '#D9D0C1'
            },
            bright: {
                name: 'Almond (Bright)',
                hex: '#F4E0E6'
            },
        }
    },

About

{Chalk Logger for objects} Rainbow JSON Stringifier - Recieves an object as an input and then outputs a JSON Stringify where each nested level is a different colour. Great for debugging.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published