{"library":"prettysize","title":"prettysize","description":"A lightweight utility to convert byte counts into human-readable strings (e.g., 1024 → \"1 kB\") for logging and CLI output. Version 2.0.0 supports sizes from bytes up to exabytes, with options to remove spaces, use single-character suffixes, control decimal places, or return only the numeric value. Minimal dependencies, pure JavaScript, works in Node.js and browsers. Alternatives like filesize.js offer more formatting features, but prettysize focuses on simplicity and small footprint.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettysize"],"cli":null},"imports":["const pretty = require('prettysize')","import pretty from 'prettysize'","const pretty = require('prettysize')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const pretty = require('prettysize');\n\n// Basic usage\nconsole.log(pretty(1024));           // \"1 kB\"\nconsole.log(pretty(1048576));        // \"1 MB\"\n\n// Options: remove space, single character, decimal places\nconsole.log(pretty(123456789, { nospace: true }));         // \"117.7M\"\nconsole.log(pretty(123456789, { one: true, places: 2 }));  // \"117.74 M\"\nconsole.log(pretty(123456789, { numOnly: true }));         // 117.7","lang":"javascript","description":"Demonstrates basic usage with a byte value, shows options for no space, single character suffix, decimal places, and numeric-only output.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}