https://github.com/ph-7/giveit
Debug by logging 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 typescript-logging
Last synced: 10 months ago
JSON representation
Debug by logging 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 (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-28T10:39:00.000Z (over 1 year ago)
- Last Synced: 2025-04-09T20:05:56.858Z (10 months ago)
- Topics: debug, debugging, javascript-debugger, logging, logging-library, npm, stringify, typescript-logging
- Language: TypeScript
- Homepage: https://npmjs.com/package/giveit
- Size: 119 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));
```

## Author
[](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!