{"_id":"@builtbyastrals/prettion","_rev":"3-2f224f288b32ae3b642af007e45fed2b","name":"@builtbyastrals/prettion","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@builtbyastrals/prettion","version":"0.1.0","keywords":["json","prettify","format","terminal","debug","cli"],"author":{"name":"Astrals"},"license":"MIT","_id":"@builtbyastrals/prettion@0.1.0","maintainers":[{"name":"richardtandean","email":"richard123tandean@gmail.com"},{"name":"bintangtimurlangit","email":"btimurlangit@gmail.com"}],"dist":{"shasum":"524045ddfc509cc1604d287dd679debf91e7a255","tarball":"https://registry.npmjs.org/@builtbyastrals/prettion/-/prettion-0.1.0.tgz","fileCount":6,"integrity":"sha512-BoPgTIJcLqD3mHaxStfFOzyZUoGGdXQgF6FX621IWHPH/e6w6IkWKWtjImtfJAMChSUPjow6jaE+K3+Og9xBYA==","signatures":[{"sig":"MEQCIBmfhKYQ91Ti7WTh/wxbkHfCtj50pCu+ILj/7dhtGMI4AiBxs8kYe3Zst3mHlkDUUCn5hygDmPj0fHgOEleoRjCKWA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6640},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"node build.js","format":"prettier --write \"src/**/*.ts\"","prepublishOnly":"npm run build"},"_npmUser":{"name":"bintangtimurlangit","email":"btimurlangit@gmail.com"},"_npmVersion":"11.0.0","description":"A simple utility to prettify JSON output for terminal debugging","directories":{"example":"examples"},"_nodeVersion":"22.11.0","dependencies":{"chalk":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^9.24.0","esbuild":"^0.25.2","ts-jest":"^29.3.2","prettier":"^3.5.3","typescript":"^5.8.3","@types/jest":"^29.5.14","@types/node":"^22.14.1","@typescript-eslint/parser":"^8.30.1","@typescript-eslint/eslint-plugin":"^8.30.1"},"_npmOperationalInternal":{"tmp":"tmp/prettion_0.1.0_1744713069254_0.7672523427203022","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.1.1":{"name":"@builtbyastrals/prettion","version":"0.1.1","keywords":["json","prettify","format","terminal","debug","cli"],"author":"","license":"MIT","_id":"@builtbyastrals/prettion@0.1.1","maintainers":[{"name":"richardtandean","email":"richard123tandean@gmail.com"},{"name":"bintangtimurlangit","email":"btimurlangit@gmail.com"}],"dist":{"shasum":"59a19e0e59759a368b6e8f70b169df84ccd0188e","tarball":"https://registry.npmjs.org/@builtbyastrals/prettion/-/prettion-0.1.1.tgz","fileCount":6,"integrity":"sha512-hno8leJAWBOaA1hKtY7S19LyTRo/R9mptqGD/3pBHF+Eva7AEpe3aV+gRjqfgHxWS9XiXrAJAo7Fih+fxo0UYA==","signatures":[{"sig":"MEQCHy487EA1f1Ua6ddZHOm/1Msiyrwy1qSpmdbXBYIM+tECIQCs/vvblqH9Z6rlcgskoeWNlCmewaATozbzrPj5ELD5tQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6718},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"62845994ccb5fe8887444017b02c10fecfc210ca","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"node build.js","format":"prettier --write \"src/**/*.ts\"","prepublishOnly":"npm run build"},"_npmUser":{"name":"bintangtimurlangit","email":"btimurlangit@gmail.com"},"_npmVersion":"11.0.0","description":"A simple utility to prettify JSON output for terminal debugging","directories":{},"_nodeVersion":"22.11.0","dependencies":{"chalk":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.56.0","esbuild":"^0.25.2","ts-jest":"^29.3.2","prettier":"^3.5.3","typescript":"^5.8.3","@types/jest":"^29.5.14","@types/node":"^22.14.1","@typescript-eslint/parser":"^8.30.1","@typescript-eslint/eslint-plugin":"^8.30.1"},"_npmOperationalInternal":{"tmp":"tmp/prettion_0.1.1_1744714780223_0.1806693597074418","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2025-04-15T10:31:09.164Z","modified":"2026-07-20T07:52:56.143Z","0.1.0":"2025-04-15T10:31:09.434Z","0.1.1":"2025-04-15T10:59:40.433Z"},"license":"MIT","keywords":["json","prettify","format","terminal","debug","cli"],"description":"A simple utility to prettify JSON output for terminal debugging","maintainers":[{"name":"bintangtimurlangit","email":"btimurlangit@gmail.com"},{"name":"richardtandean","email":"richard123tandean@gmail.com"}],"readme":"# prettion\n\nA simple utility to prettify JSON output for terminal debugging with color support.\n\n## Requirements\n\n- Node.js >= 18.0.0\n\n## Installation\n\n```bash\nnpm install @builtbyastrals/prettion\n```\n\n## Usage\n\n```javascript\nconst prettion = require('@builtbyastrals/prettion').default;\n// or using ES modules\n// import prettion from '@builtbyastrals/prettion';\n\n// Example usage with an API response object\nconst response = {\n  status: 'success',\n  data: {\n    users: [\n      { id: 1, name: 'John', active: true },\n      { id: 2, name: 'Jane', active: false }\n    ],\n    totalCount: 2\n  }\n};\n\n// Pretty print with default options (colored output with 2-space indentation)\nconsole.log(prettion(response));\n\n// Customize formatting\nconsole.log(prettion(response, {\n  indent: 4,        // Use 4 spaces for indentation\n  colors: true,     // Enable colors (default)\n  sortKeys: true    // Sort object keys alphabetically\n}));\n\n// Prettify a JSON string\nconst jsonString = '{\"name\":\"John\",\"age\":30,\"isActive\":true}';\nconsole.log(prettion(jsonString));\n```\n\n## Options\n\n| Option    | Type    | Default | Description                         |\n|-----------|---------|---------|-------------------------------------|\n| indent    | number  | 2       | Number of spaces for indentation    |\n| colors    | boolean | true    | Enable colored output               |\n| sortKeys  | boolean | false   | Sort object keys alphabetically     |\n\n## Features\n\n- Pretty-prints JSON with proper indentation\n- Syntax highlighting with colors for better readability\n- Handles both JSON objects and strings\n- Customizable indentation\n- Option to sort object keys alphabetically\n- Graceful handling of invalid inputs\n\n## License\n\nMIT ","readmeFilename":"README.md"}