Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loklaan/print-json-key-size-cli
Prints the size of root keys in a JSON file
https://github.com/loklaan/print-json-key-size-cli
Last synced: 8 days ago
JSON representation
Prints the size of root keys in a JSON file
- Host: GitHub
- URL: https://github.com/loklaan/print-json-key-size-cli
- Owner: loklaan
- Created: 2020-02-18T22:12:51.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T00:55:53.000Z (over 3 years ago)
- Last Synced: 2024-04-14T06:15:31.443Z (9 months ago)
- Language: JavaScript
- Size: 40 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Print JSON Sizes CLI
![npm](https://img.shields.io/npm/v/print-json-key-size-cli)
Print the size of JSON keys, in Byte/KB/MB.
`print-json-size ./file.json`
```
JSON file size, broken-down by root keys../package.json
{
"description" 19% 73 b
"dependencies" 16% 60 b
"author" 13% 50 b
"bin" 11% 43 b
"name" 10% 39 b
"files" 10% 39 b
"version" 5% 20 b
"main" 5% 20 b
"license" 5% 17 b
} 384 b total
```## Getting started
Run the following against a `.json` file.
```shell
# Install globally
npm install -g print-json-key-size-cli
json-key-size ./file.json# Or, invoke directly
npx print-json-key-size-cli ./file.json
```