1.1.1 • Published 5 years ago
get-file-sizes v1.1.1
Get File Fizes
This package returns file sizes.
Installation
This is a Node.js module available through the
npm registry. Install using the
npm install
command:
$ npm install get-file-sizes
Usage
CLI
$ node cli.js [folder]
Returns
[ { filePath: 'tests/fixtures/cropped-coffee.jpg',
size: '129.44KB',
sizeKb: '129.44KB',
sizeRaw: 132548 },
{ filePath: 'tests/fixtures/sample.txt',
size: '867B',
sizeKb: '0.85KB',
sizeRaw: 867 } ]
Name | Type | Description |
---|---|---|
size | string | Value |
sizeKb | string | Value in Kilobytes |
sizeRaw | number | Value in bytes |
JS
const getFileSizes = require('get-file-sizer');
License
This package is released under the terms of the MIT License.