Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ph-7/giveit
Debug with ease any nested objects, arrays, etc. JSON.stringify wrapper to display nested objects with indentation & color for quick debugging
https://github.com/ph-7/giveit
debug debugging javascript-debugger logging logging-library npm stringify
Last synced: 3 months ago
JSON representation
Debug with ease any nested objects, arrays, etc. JSON.stringify wrapper to display nested objects with indentation & color for quick debugging
- Host: GitHub
- URL: https://github.com/ph-7/giveit
- Owner: pH-7
- License: mit
- Created: 2024-05-17T08:49:40.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-06T10:44:05.000Z (7 months ago)
- Last Synced: 2024-09-23T10:07:06.530Z (3 months ago)
- Topics: debug, debugging, javascript-debugger, logging, logging-library, npm, stringify
- Language: TypeScript
- Homepage: https://npmjs.com/package/giveit
- Size: 117 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# 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](https://www.npmjs.com/package/giveit)
```console
npm i giveit
```### Using [Yarn](https://yarnpkg.com/package/giveit)
```console
yarn add giveit
```## Usage
```typescript
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](example-giveit-output.png)
## Author
[![Pierre-Henry Soria](https://s.gravatar.com/avatar/a210fe61253c43c869d71eaed0e90149?s=200)](https://ph7.me "Pierre-Henry Soria - Software Data Engineer")
[Pierre-Henry Soria ツ](https://ph7.me) – A [super passionate](https://github.com/pH-7) 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](https://www.linkedin.com/in/ph7enry/) ⚡️
## License
Distributed under the _[MIT](https://opensource.org/licenses/MIT)_ 🎉 Enjoy!