Skip to content

Commit 5e79629

Browse files
committed
update document
1 parent fb9e56a commit 5e79629

File tree

4 files changed

+62
-3
lines changed

4 files changed

+62
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ typings/
5959

6060
# next.js build output
6161
.next
62+
lib

README.md

+59-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,61 @@
11
# jcc_file
22

3-
[![Build Status](https://travis-ci.com/JCCDex/jcc_file.svg?branch=master)](https://travis-ci.com/JCCDex/jcc_file)
3+
![npm](https://img.shields.io/npm/v/jcc_file.svg)
4+
[![Build Status](https://travis-ci.com/JCCDex/jcc_file.svg?branch=master)](https://travis-ci.com/JCCDex/jcc_file)
5+
[![Coverage Status](https://coveralls.io/repos/github/JCCDex/jcc_file/badge.svg?branch=master)](https://coveralls.io/github/JCCDex/jcc_file?branch=master)
6+
[![npm downloads](https://img.shields.io/npm/dm/jcc_file.svg)](http://npm-stat.com/charts.html?package=jcc_file)
7+
8+
## Installtion
9+
10+
```shell
11+
npm install jcc_file
12+
```
13+
14+
## API
15+
16+
### importFile
17+
18+
import file to get result, if we need, we aslo could decode qrcode image.
19+
20+
```javascript
21+
const importFile = require('jcc_file').importFile
22+
// import { importFile } from 'jcc_file';
23+
importFile(event, needConvert).then(res => {}).catch(error => {})
24+
```
25+
26+
Parameters
27+
28+
- `event`- `object`
29+
- `needConvert`- `boolean`
30+
31+
- if decode image
32+
33+
### exportToText
34+
35+
export text content to text file
36+
37+
```javascript
38+
const exportToText = require('jcc_file').exportToText
39+
// import { exportToText } from 'jcc_file';
40+
exportToText(text, name).then(() => {}).catch(error => {})
41+
```
42+
43+
Parameters
44+
45+
- `text`- `string`
46+
- `name`- `string`
47+
48+
### exportToQR
49+
50+
export text content to text file
51+
52+
```javascript
53+
const exportToQR = require('jcc_file').exportToQR
54+
// import { exportToQR } from 'jcc_file';
55+
exportToQR(text, name).then(() => {}).catch(error => {})
56+
```
57+
58+
Parameters
59+
60+
- `text`- `string`
61+
- `name`- `string`

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jcc_file",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"description": "import and export file of jcc",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)