Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/afeiship/next-filesize

Get filesize based on filesize lib.
https://github.com/afeiship/next-filesize

file filesize next size

Last synced: 20 days ago
JSON representation

Get filesize based on filesize lib.

Awesome Lists containing this project

README

        

# next-filesize
> Get filesize based on filesize lib.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-filesize
```

## usage
```js
import '@jswork/next-filesize';

nx.filesize('/page/testfile.js', { bits: true });
// { size: 421, sizeOf: '3.29Kb' }
```

## resources
- https://github.com/avoidwork/filesize.js
- https://stackoverflow.com/questions/42363140/how-to-find-the-size-of-the-file-in-node-js

## license
Code released under [the MIT license](https://github.com/afeiship/next-filesize/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-filesize
[version-url]: https://npmjs.org/package/@jswork/next-filesize

[license-image]: https://img.shields.io/npm/l/@jswork/next-filesize
[license-url]: https://github.com/afeiship/next-filesize/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-filesize
[size-url]: https://github.com/afeiship/next-filesize/blob/master/dist/next-filesize.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-filesize
[download-url]: https://www.npmjs.com/package/@jswork/next-filesize