# s-file-load

> Svelte rudimentary bare-bone file loader without any CSS dependency.

Latest version **0.5.0** (published 2023-09-29) · GNUv3 license · 0 weekly downloads

## Install

```sh
npm install s-file-load
pnpm add s-file-load
yarn add s-file-load
bun add s-file-load
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2023-09-29 |
| First published | 2023-09-10 |
| Weekly downloads | 0 |
| License | GNUv3 |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 17.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jean M. |
| Maintainers | nanotron |
| Keywords | svelte, component, file |

## Links

- npm: https://www.npmjs.com/package/s-file-load
- Repository: https://github.com/s-library/s-file-load
- Homepage: https://s-file-load-khn1ohzvd-s-library.vercel.app/
- Issues: https://github.com/s-library/s-file-load.git/issues
- Funding: https://www.patreon.com/avidys
- npm.io page: https://npm.io/package/s-file-load

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.5.0 (latest) — 2023-09-29
- 0.4.0 — 2023-09-16
- 0.3.0 — 2023-09-11
- 0.1.2 — 2023-09-11
- 0.1.1 — 2023-09-11
- 0.1.0 — 2023-09-11
- 0.0.1 — 2023-09-10

## README

![npm](https://img.shields.io/npm/v/s-file-load?label=Last%20version)

# s-file-load

Simple file upload Svelte component.

## Live demo

https://s-file-load-khn1ohzvd-s-library.vercel.app/

## Non-exhaustive features list:
 - No other dependencies 
 - No CSS library: ready to use with no overhead
 - Click or drag-and-drop
 - Customizable: label, theme, post-upload actions
 - Return file content in variable 
 - use cases: read config file or other small files
 - example of parsing JSON, YAML, or XML directly to JS objects


## Installation

This package is a Svelte library and is intended to be installed within a Svelte application or another library. 
For example, as described here, you can create a Svelte skeleton Svelte application using:
```bash
pnpm create svelte@latest my-app
```
(I prefer pnpm for the speed and disk space optimization, but the old good npm or yarn work just as well.)

Then install the component:
```bash
pnpm i s-file-load
```

## Examples of Code

```ts
<script lang="ts">
    import { DropFile } from 's-file-load';
    let content: string = ''; // content of the file(s) selected
</script>

<div class="test-container-content">
    <DropFile boxSize="medium" theme="dark" showResult={true} />
</div>

```

## Contact Us

 - through GITHUB
 
## TODO

 - Return content in store
 - REPL

## Credits

 - Created following (https://kit.svelte.dev/docs/packaging).
 - Using ```bash npm create svelte@latest my-app```
 - Inspired by https://flowbite-svelte.com/docs/forms/file-input; like the code but wanted a component more self-sufficient in term of behavior and style.   

## License

 - GNUv3
 - Free to include in open source software 
 - But any commercial application is not granted and will need a separate license (please contact us).

---
_Source: https://npm.io/package/s-file-load · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
