File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change 86
86
87
87
### Node.js
88
88
89
- Node.js >= v18.12 .0
89
+ Node.js >= v20.19 .0
90
90
91
91
``` bash
92
92
npm i jike-sdk
93
93
```
94
94
95
- #### ESM 导入
96
-
97
- 如果使用 ESM 方式导入,需要把 ` package.json ` 的 ` type ` 设置为 ` module ` ,或将后缀名改为 ` .mjs ` 。
98
-
99
95
``` ts
100
- // index.mjs
101
-
102
- // 使用此版本需 node >= 18 或 自行 ployfill fetch。
103
96
import { setApiConfig } from ' jike-sdk'
104
97
105
98
setApiConfig ({
106
99
// ...
107
100
})
108
101
```
109
102
110
- #### CJS 导入
111
-
112
- ``` ts
113
- const { setApiConfig } = require (' jike-sdk' )
114
- setApiConfig ({
115
- // ...
116
- })
117
- ```
118
-
119
103
### Bun
120
104
121
105
Bun >= 0.5.8
@@ -182,7 +166,7 @@ const client = ApiClient(apiConfig)
182
166
client .users .profile ()
183
167
```
184
168
185
- ## Contributing [ ![ PRs Welcome ] ( https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square )] ( https://makeapullrequest.com )
169
+ ## Contributing
186
170
187
171
see [ CONTRIBUTING.md] ( ./CONTRIBUTING.md )
188
172
@@ -196,4 +180,4 @@ see [CONTRIBUTING.md](./CONTRIBUTING.md)
196
180
197
181
## License
198
182
199
- [ AGPL-3.0] ( ./LICENSE ) License © 2021-PRESENT [ 三咲智子 ] ( https://github.com/sxzz )
183
+ [ AGPL-3.0] ( ./LICENSE ) License © 2021-PRESENT [ Kevin Deng ] ( https://github.com/sxzz )
You can’t perform that action at this time.
0 commit comments