Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qiao-config

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qiao-config - npm Package Compare versions

Comparing version 2.0.4 to 3.0.0

6

package.json
{
"name": "qiao-config",
"version": "2.0.4",
"version": "3.0.0",
"description": "json config to local file",

@@ -33,3 +33,3 @@ "keywords": [

"dependencies": {
"qiao-file": "^3.0.0"
"qiao-file": "^3.0.1"
},

@@ -53,3 +53,3 @@ "nx": {

},
"gitHead": "438ac047332a912cceba9880d70ff1e89b135298"
"gitHead": "5b04b03fd27566449f795ec99ef4ce97c5b2f0be"
}

@@ -16,10 +16,24 @@ ## qiao-config

## use
使用
```javascript
// cjs
const DB = require('qiao-config');
// mjs
import DB from 'qiao-config';
```
## db
db 实例
```javascript
// default
const db = require('qiao-config')();
const db = DB();
// custom
const db = require('qiao-config')('your path');
const db = DB('/custom/path/to/db.json');
```

@@ -31,4 +45,10 @@

获取所有信息
- return
- 类型: object
- 说明: 所有信息
```javascript
await db.all();
const all = await db.all();
```

@@ -38,2 +58,4 @@

清空所有信息
```javascript

@@ -45,2 +67,16 @@ await db.clear();

获取,设置,删除数据
- key
- 类型: string
- 说明: 只传入 key 时,获取信息
- value
- 类型: any
- 说明:
- 设置信息时,传入 key 和 value
- 删除信息时传入 null
- return
- 类型: any
- 说明: 获取信息是返回 value,其他无返回
```javascript

@@ -59,2 +95,7 @@ // get

### 0.0.6.20230407
1. 优化测试用例和 readme
2. 3.0.0
### 0.0.5.20230404

@@ -61,0 +102,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc