# fs-access-chunk-store

> File System Access API chunk store that is abstract-chunk-store compliant

Latest version **1.1.0** (published 2021-07-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install fs-access-chunk-store
pnpm add fs-access-chunk-store
yarn add fs-access-chunk-store
bun add fs-access-chunk-store
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-07-09 |
| First published | 2021-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | Socket Inc |
| Maintainers | feross, jhiesey |
| Keywords | abstract-chunk-store, chunk, webfs, file system access api, filesystem access, file system access, FileSystemHandle, FileSystemFileHandle, FileSystemDirectoryHandle, FileSystemWritableFileStream |

## Links

- npm: https://www.npmjs.com/package/fs-access-chunk-store
- Repository: https://github.com/SocketDev/fs-access-chunk-store
- Issues: https://github.com/SocketDev/fs-access-chunk-store/issues
- npm.io page: https://npm.io/package/fs-access-chunk-store

## 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

- 1.1.0 (latest) — 2021-07-09
- 1.0.1 — 2021-06-02
- 1.0.0 — 2021-06-02

## README

# fs-access-chunk-store [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]

[ci-image]: https://img.shields.io/github/workflow/status/SocketDev/fs-access-chunk-store/ci/master
[ci-url]: https://github.com/SocketDev/fs-access-chunk-store/actions
[npm-image]: https://img.shields.io/npm/v/fs-access-chunk-store.svg
[npm-url]: https://npmjs.org/package/fs-access-chunk-store
[downloads-image]: https://img.shields.io/npm/dm/fs-access-chunk-store.svg
[downloads-url]: https://npmjs.org/package/fs-access-chunk-store
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
[standard-url]: https://standardjs.com

#### [File System Access API](https://web.dev/file-system-access/) chunk store that is [abstract-chunk-store](https://github.com/mafintosh/abstract-chunk-store) compliant

[![abstract chunk store](https://cdn.rawgit.com/mafintosh/abstract-chunk-store/master/badge.svg)](https://github.com/mafintosh/abstract-chunk-store)

## Install

```
npm install fs-access-chunk-store
```

## Usage

```js
const fsAccessChunkStore = require('fs-access-chunk-store')
const chunks = fsAccessChunkStore(10)

chunks.put(0, new Buffer('01234567890'), function (err) {
  if (err) throw err
  chunks.get(0, function (err, chunk) {
    if (err) throw err
    console.log(chunk) // '01234567890' as a buffer
  })
})
```

## Options

- `length`: Total size of the chunk store (optional, default: `Infinity`)
- `name`: Top-level directory to create for this store (optional, default: `default`)
- `rootDir`: Root directory handle (optional, default: `navigator.storage.getDirectory()`)

## License

MIT. Copyright (c) [Socket Inc](https://socket.dev)

---
_Source: https://npm.io/package/fs-access-chunk-store · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
