https://github.com/worksolutions/frontend-utils
https://github.com/worksolutions/frontend-utils
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/worksolutions/frontend-utils
- Owner: worksolutions
- Created: 2020-09-25T07:54:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-28T12:18:14.000Z (over 1 year ago)
- Last Synced: 2025-12-21T16:55:38.135Z (6 months ago)
- Language: TypeScript
- Size: 4.55 MB
- Stars: 8
- Watchers: 7
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @worksolutions/utils
Утилиты для фронтенд приложений
---
### Установка
```bash
npm i @worksolutions/utils
```
### Demos
---
#### files
###### convertBytesToHumanReadableFormat
```typescript jsx
convertBytesToHumanReadableFormat(2048) // 2.0 кб
```
###### createFileInput
```typescript jsx
// createFileInput(multiply?: boolean, acceptTypes?: AcceptTypes[])
createFileInput(false, AcceptTypes.IMAGE)
```
###### convertFileToFileInterface
```typescript jsx
convertFileToFileInterface(instanceOfFile) // FileInterface
```