pH-7 / giveit

Debug with ease any nested objects, arrays, etc. JSON.stringify wrapper to display nested objects with indentation & color for quick debugging

Home Page:https://npmjs.com/package/giveit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

giveit

Debug with ease any nested objects, arrays, etc. giveit (AKA "Give It To Me") is a lightweight JSON.stringify wrapper to display nested objects with indentation and color for quick debugging.

Installation

Using NPM

npm i giveit

Using Yarn

yarn add giveit

Usage

import { giveit } from "giveit";

const arrObj = [
  {
    name: "John Doe",
    age: 30,
    city: "New York",
    hobbies: ["reading", "cooking"],
    married: false,
    address: {
      street: "123 Main St",
      zip: 12345,
    },
  },
];

// give it! giveit() will nicely show arrObj
console.log("See nested values of arrObj", giveit(arrObj));

Example of showing nested objects

Author

Pierre-Henry Soria

Pierre-Henry Soria ツ – A super passionate and enthusiastic Problem-Solver / Senior Software Data Engineer living currently in Sydney. Also, a true cheese πŸ§€, ristretto β˜•οΈ, and dark chocolate lover! πŸ˜‹ πŸ‘‰ Reach me on LinkedIn ⚑️

License

Distributed under the MIT πŸŽ‰ Enjoy!

About

Debug with ease any nested objects, arrays, etc. JSON.stringify wrapper to display nested objects with indentation & color for quick debugging

https://npmjs.com/package/giveit

License:MIT License


Languages

Language:TypeScript 100.0%