Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaid/stat-size
Promise that returns the size of a file or directory.
https://github.com/jaid/stat-size
bytes directory disk file folder fs node node-js promise size utility volume
Last synced: 12 days ago
JSON representation
Promise that returns the size of a file or directory.
- Host: GitHub
- URL: https://github.com/jaid/stat-size
- Owner: Jaid
- License: mit
- Created: 2021-01-05T06:04:47.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-27T08:29:59.000Z (over 2 years ago)
- Last Synced: 2024-08-09T03:27:50.094Z (5 months ago)
- Topics: bytes, directory, disk, file, folder, fs, node, node-js, promise, size, utility, volume
- Language: JavaScript
- Homepage: https://github.com/Jaid/stat-size
- Size: 1.41 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/funding.yml
- License: license.txt
Awesome Lists containing this project
README
# stat-size
**Promise that returns the size of a file or directory.**
## Installation
```bash
npm install --save stat-size@^1.0.2
``````bash
yarn add stat-size@^1.0.2
```
(if [configured properly](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-npm-for-use-with-github-packages))```bash
npm install --save @jaid/stat-size@^1.0.2
```## Example
```javascript
import statSize from "stat-size"const result = statSize("pikachu_8x8.png")
```Variable `result` will be:
```javascript
129
```## Development
Setting up:
```bash
git clone [email protected]:jaid/stat-size.git
cd stat-size
npm install
```
Testing:
```bash
npm run test:dev
```
Testing in production environment:
```bash
npm run test
```## License
[MIT License](https://raw.githubusercontent.com/jaid/stat-size/master/license.txt)
Copyright © 2020, Jaid \ (https://github.com/jaid)