https://github.com/alpheusday/filego.js
A file splitting & merging solution
https://github.com/alpheusday/filego.js
check filego filesystem javascript merge split typescript
Last synced: 12 months ago
JSON representation
A file splitting & merging solution
- Host: GitHub
- URL: https://github.com/alpheusday/filego.js
- Owner: alpheustangs
- License: mit
- Created: 2024-05-09T13:35:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T12:59:59.000Z (over 1 year ago)
- Last Synced: 2024-10-29T14:58:32.522Z (over 1 year ago)
- Topics: check, filego, filesystem, javascript, merge, split, typescript
- Language: TypeScript
- Homepage:
- Size: 4.94 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FileGo
> **⚠️ This project is discontinued. Please migrate to [`FileRune`](https://github.com/filerune/javascript) for future updates and maintenance.**
A file splitting & merging solution.
## Installation
For JavaScript/TypeScript environment:
```sh
# npm
npm i @filego/js
# Yarn
yarn add @filego/js
# pnpm
pnpm add @filego/js
# Deno
deno add npm:@filego/js
# Bun
bun add @filego/js
```
For Node.js, Deno, and Bun runtime environment:
```sh
# npm
npm i @filego/node
# Yarn
yarn add @filego/node
# pnpm
pnpm add @filego/node
# Deno
deno add npm:@filego/node
# Bun
bun add @filego/node
```
## Quick Start
Easily split a file into chunks using the split function from `@filego/js`, or work directly with the file system using `@filego/node`.
```ts
import { split } from "@filego/js";
const file: File | Blob | Uint8Array | string = "";
await split({
file,
chunkSize: 2 * 1024 * 1024,
});
```
```ts
import { split } from "@filego/node";
await split({
inFile: "/path/to/file.txt",
outDir: "/path/to/dir",
chunkSize: 2 * 1024 * 1024,
});
```
## APIs
For the JS package APIs,
please refer to the [JS APIs](./apis/js/README.md).
For the Node package APIs,
please refer to the [Node APIs](./apis/node/README.md).
## Examples
Check out the Web and API examples:
For the example of web in React, please refer to [examples/web](./examples/web/).
For the example of Node in Hono, please refer to [examples/node](./examples/node/).
## License
This project is licensed under the terms of the MIT license.