Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lxxyx/ncu-electric
用于查询电费信息
https://github.com/lxxyx/ncu-electric
Last synced: about 1 month ago
JSON representation
用于查询电费信息
- Host: GitHub
- URL: https://github.com/lxxyx/ncu-electric
- Owner: Lxxyx
- Created: 2016-03-19T05:22:11.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-19T05:30:44.000Z (almost 9 years ago)
- Last Synced: 2024-12-15T09:37:44.613Z (about 1 month ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## 介绍
用于查询电费信息。昌大助手的组件。
## 运行方式
```javascript
npm install ncu-electric --save
```
```
var ele = require('ncu-electric')
// 填写寝室号
ele.getInfo(dormitory)
.then(data => {
// 对获取到的电费数据进行操作
})
.catch(err => {
// 错误处理
})将要查找的图书地址,放入一个json文件中即可。
## 开发
```
git clone https://github.com/Lxxyx/ncu-electric
cd ncu-electric
npm install
gulp
```
### 测试
全局安装mocha
```
npm i mocha -g
```
然后:
```
npm test
```