https://github.com/thinkjs/think-store-file
Use file to store content
https://github.com/thinkjs/think-store-file
store think-adapter thinkjs3
Last synced: 11 months ago
JSON representation
Use file to store content
- Host: GitHub
- URL: https://github.com/thinkjs/think-store-file
- Owner: thinkjs
- License: mit
- Created: 2017-03-19T06:52:53.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-02-20T23:36:15.000Z (over 4 years ago)
- Last Synced: 2025-06-30T09:07:18.222Z (11 months ago)
- Topics: store, think-adapter, thinkjs3
- Language: JavaScript
- Size: 30.3 KB
- Stars: 2
- Watchers: 9
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# think-store-file
[](https://travis-ci.org/thinkjs/think-store-file)
[](https://coveralls.io/github/thinkjs/think-store-file?branch=master)
[](https://www.npmjs.com/package/think-store-file)
`think-store-file` use file to store content
## Usage
```js
import StoreFile from 'think-store-file';
let storeFileInst = new StoreFile(storePath);
let relativePath = 'abc/a.js';
await storeFileInst.set(relativePath, 'Thinkjs'); // set 'Thinkjs' as content
await storeFileInst.get(relativePath); // Thinkjs
await storeFileInst.delete(relativePath); // delete a.js
```