{"_id":"@dhlx/event-emitter","_rev":"2-8ed6c51fcca5857f5f5b8ad4678546e3","name":"@dhlx/event-emitter","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@dhlx/event-emitter","version":"0.0.1","_id":"@dhlx/event-emitter@0.0.1","maintainers":[{"name":"lidenghui~","email":"3379489032@qq.com"}],"dist":{"shasum":"4a18f76cbf6b8dba7be10a723ff89076bd4895c9","tarball":"https://registry.npmjs.org/@dhlx/event-emitter/-/event-emitter-0.0.1.tgz","fileCount":8,"integrity":"sha512-oM2Wj6BqxDI9wxz81cTDefijLELBRbswXGO74qziGnrGJ+YajFgKG022jTfetVTX1WqvNk+a+wyuk60ydFhwew==","signatures":[{"sig":"MEUCIHi8ubWcbMoaN1wqg9CxfpL7qE1u68ktVBmRE3a2fmogAiEAkvwhEbPmCx22Pl4odXrGcnFDCZCGjcQpUhoH6JSW914=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6137},"main":"./dist/index.umd.cjs","type":"module","types":"./dist/lib/main.d.ts","module":"./dist/index.js","exports":{"types":"./dist/lib/main.d.ts","import":"./dist/index.js","require":"./dist/index.umd.cjs"},"private":false,"scripts":{"dev":"vite","test":"jest","build":"tsc && vite build"},"_npmUser":{"name":"lidenghui~","email":"3379489032@qq.com"},"repository":{"url":""},"_npmVersion":"11.1.0","description":"A utility function to format file sizes from kilobytes (KB) to larger units like megabytes (MB), gigabytes (GB), terabytes (TB), and petabytes (PB).","directories":{},"_nodeVersion":"22.13.1","dependencies":{"vite-plugin-dts":"^4.2.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","vite":"^5.2.10","ts-jest":"^29.3.1","prettier":"^3.3.3","typescript":"^5.4.5","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/event-emitter_0.0.1_1744267951812_0.020125053116571978","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@dhlx/event-emitter","private":false,"version":"0.0.2","type":"module","main":"./dist/index.umd.cjs","module":"./dist/index.js","types":"./dist/lib/main.d.ts","exports":{"types":"./dist/lib/main.d.ts","import":"./dist/index.js","require":"./dist/index.umd.cjs"},"scripts":{"dev":"vite","build":"tsc && vite build","test":"jest"},"devDependencies":{"@types/jest":"^29.5.14","jest":"^29.7.0","prettier":"^3.3.3","ts-jest":"^29.3.1","typescript":"^5.4.5","vite":"^5.2.10"},"dependencies":{"vite-plugin-dts":"^4.2.2"},"repository":{"type":"git","url":"git+https://github.com/LiDengHui/event-emitter.git"},"description":"A simple event emitter for TypeScript.","keywords":["event-emitter","typescript","event-driven"],"author":{"name":"LiDengHui"},"license":"MIT","_id":"@dhlx/event-emitter@0.0.2","gitHead":"1aadfd838a1d5d296288cda981ed25f61846f291","bugs":{"url":"https://github.com/LiDengHui/event-emitter/issues"},"homepage":"https://github.com/LiDengHui/event-emitter#readme","_nodeVersion":"22.13.1","_npmVersion":"11.1.0","dist":{"integrity":"sha512-FsjbOiokQ4z5f8C/gHjThC6Ym6qOpT0E1IZMez+ZrqjJKz9gh5y1xBbZLTkc2pS6jkCSwVwp53FHKkVIO5nWBw==","shasum":"945327a8b345696b9a9f4db067968cd66ba02668","tarball":"https://registry.npmjs.org/@dhlx/event-emitter/-/event-emitter-0.0.2.tgz","fileCount":8,"unpackedSize":6389,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIH/psjsg909mHHKjWoQWN1LvNMBY0hI1ZtV+7dhVNNYMAiEAnd102bZ2uXDIVMJIQ8ANAjnBrruqDztUPYLcl/M0r9k="}]},"_npmUser":{"name":"lidenghui~","email":"3379489032@qq.com"},"directories":{},"maintainers":[{"name":"lidenghui~","email":"3379489032@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/event-emitter_0.0.2_1744268223949_0.1566861638718482"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-10T06:52:31.614Z","modified":"2025-04-10T06:57:04.323Z","0.0.1":"2025-04-10T06:52:31.995Z","0.0.2":"2025-04-10T06:57:04.162Z"},"repository":{"type":"git","url":"git+https://github.com/LiDengHui/event-emitter.git"},"description":"A simple event emitter for TypeScript.","maintainers":[{"name":"lidenghui~","email":"3379489032@qq.com"}],"readme":"# @dhlx/format-size-units\n\nA utility function to format file sizes from kilobytes (KB) to larger units like megabytes (MB), gigabytes (GB), terabytes (TB), and petabytes (PB).\n\n## Installation\n\nInstall the package using npm or yarn:\n\n```bash\nnpm install @dhlx/format-size-units\n```\n\n\n## Usage\nYou can use the function to convert a file size in kilobytes (KB) into a more readable format.\n\nExample\n\n```js\nimport formatSizeUnits from '@dhlx/format-size-units';\n\nconst fileSizeInKB = 10240; // 10 MB in KB\nconst formattedSize = formatSizeUnits(fileSizeInKB);\n\nconsole.log(formattedSize); // Output: \"10.00 MB\"\n```\n\n## API\nformatSizeUnits(kb: number): string\n\n* Formats a size in kilobytes to a more human-readable format, selecting the appropriate unit based on the size.\n\nParameters:\n    \n* kb (number): The file size in kilobytes.\n\nReturns:\n\n* string: A string representation of the formatted size with two decimal places and the appropriate unit (KB, MB, GB, etc.).\n## License\nThis project is licensed under the MIT License.","readmeFilename":"README.md","homepage":"https://github.com/LiDengHui/event-emitter#readme","keywords":["event-emitter","typescript","event-driven"],"author":{"name":"LiDengHui"},"bugs":{"url":"https://github.com/LiDengHui/event-emitter/issues"},"license":"MIT"}