# foca-electron-storage

> Foca持久化electron引擎

Latest version **0.0.2** (published 2024-11-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install foca-electron-storage
pnpm add foca-electron-storage
yarn add foca-electron-storage
bun add foca-electron-storage
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2024-11-08 |
| First published | 2023-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 39 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | geekact |
| Keywords | redux-persist, electron-persist |

## Links

- npm: https://www.npmjs.com/package/foca-electron-storage
- Repository: https://github.com/foca-js/foca-electron-storage
- Homepage: https://github.com/foca-js/foca-electron-storage#readme
- Issues: https://github.com/foca-js/foca-electron-storage/issues
- npm.io page: https://npm.io/package/foca-electron-storage

## Dependencies (1)

- [conf](https://npm.io/package/conf.md) ^13.0.1

## Recent versions

- 0.0.2 (latest) — 2024-11-08
- 0.0.1 — 2023-10-01

## README

# foca-electron-storage

electron 端的持久化引擎。

[![License](https://img.shields.io/github/license/foca-js/foca-electron-storage?logo=open-source-initiative)](https://github.com/foca-js/foca-electron-storage/blob/master/LICENSE)
[![npm](https://img.shields.io/npm/v/foca-electron-storage?logo=npm)](https://www.npmjs.com/package/foca-electron-storage)

# 安装

```bash
# npm
npm install foca-electron-storage
# yarn
yarn add foca-electron-storage
# pnpm
pnpm add foca-electron-storage
```

# 使用

```diff
import { store } from 'foca';
+import { electronStorage } from 'foca-electron-storage';

store.init({
  persist: [
    {
      key: 'my-project',
      version: '1',
+     engine: electronStorage,
      models: [],
    },
  ],
});
```

也可以定制参数

```diff
import { store } from 'foca';
+import { createElectronStorage } from 'foca-electron-storage';

store.init({
  persist: [
    {
      key: 'my-project',
      version: '1',
+     engine: createElectronStorage({...}),
      models: [],
    },
  ],
});
```

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