# lisa.sync

Latest version **1.2.4** (published 2021-08-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install lisa.sync
pnpm add lisa.sync
yarn add lisa.sync
bun add lisa.sync
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.4 |
| Published | 2021-08-17 |
| First published | 2019-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | apporoad |
| Maintainers | apporoad |

## Links

- npm: https://www.npmjs.com/package/lisa.sync
- Repository: https://github.com/apporoad/LiSA.sync
- Homepage: https://github.com/apporoad/LiSA.sync#readme
- Issues: https://github.com/apporoad/LiSA.sync/issues
- npm.io page: https://npm.io/package/lisa.sync

## Dependencies (2)

- [lisa.orbit](https://npm.io/package/lisa.orbit.md) ^1.0.6
- [lisa.utils](https://npm.io/package/lisa.utils.md) ^2.5.0

## Recent versions

- 1.2.4 (latest) — 2021-08-17
- 1.2.3 — 2021-08-17
- 1.2.2 — 2021-08-17
- 1.2.1 — 2020-06-25
- 1.1.5 — 2020-06-01
- 1.1.4 — 2020-05-12
- 1.1.3 — 2020-03-21
- 1.1.2 — 2019-12-22
- 1.1.1 — 2019-12-22
- 1.1.0 — 2019-12-22
- 1.0.1 — 2019-11-23
- 1.0.0 — 2019-08-12

## README

<div align=center><img src="https://raw.githubusercontent.com/apporoad/LiSA.sync/master/docs/logo.png"/></div>

# LiSA.sync
sync framework for node   
LiSA.sync 默认的采用 fileAdapter   
使用不同的adapter时请参考示例

## phil（哲学）

[phil](./phil.md)

## use

[use with lisa.sync.fileadapter](https://github.com/apporoad/LiSA.sync.fileAdapter.js.git)
```bash
npm i --save lisa.sync
```
```js
var LiSASync = require('lisa.sync')

var LiSA = LiSASync(__dirname + '/test/LiSA.json',{internal : 2000})

console.log(LiSA.getSync())

LiSA.set({ name : "LiSA1" , gender : "girl"})

console.log(LiSA.getSync())

var index =0

LiSA.sync(()=>{
    return {
        name : "LiSA2"
    }
})

console.log(LiSA.getSync())

//you can call sync 
LiSA.sync(data=>{
    data.oneNode = { name : "testNode"}
})

LiSA.get().then(d=>{
    console.log(d)
})

//stop sync
LiSA.stop()

```

## how to diy your adapter 
```js
exports.getId = (D)=>{}
exports.syncReader = (D) =>{}
exports.reader = (D)=>{}
exports.writer = (D,data)=>{}
```
## use your adapter
```js
var LiSASync = require('lisa.sync')

var yourAdapter = require('yourAdapterPath')

var LiSA = LiSASync(__dirname + '/test/LiSA.json',{internal : 2000} , yourAdapter)

```
just have a peek on [lisa.sync.fileadapter](https://github.com/apporoad/LiSA.sync.fileAdapter.js.git)   
aok adapter [aok](https://github.com/apporoad/LiSA.sync.aokAdapter.js)  
csv adapter [csv](https://github.com/apporoad/LiSA.sync.csvAdapter.js)

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