-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,317 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,8 @@ | |
/public/ | ||
/config/ | ||
/repo/ | ||
!.vuepress | ||
|
||
!/docs/.vuepress/ | ||
/docs/.vuepress/dist/* | ||
|
||
barcode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[[toc]] | ||
|
||
<h2>引入</h2> | ||
|
||
```ts | ||
import { generateCSV } from 't-comm'; | ||
|
||
// or | ||
import { generateCSV} from 't-comm/lib/csv/index'; | ||
``` | ||
|
||
|
||
## `generateCSV(dataList)` | ||
|
||
|
||
**描述**:<p>生成 CSV 文件内容,可以用于 fs.writeFileSync 输出</p> | ||
<p>第一行为表头</p> | ||
|
||
**参数**: | ||
|
||
|
||
| 参数名 | 类型 | 描述 | | ||
| --- | --- | --- | | ||
| dataList | <code>Array<Array<string>></code> | <p>二维数据列表</p> | | ||
|
||
**返回**: <p>生成的字符串</p> | ||
|
||
**示例** | ||
|
||
```ts | ||
generateCSV([['a','b'], ['1', '2']]); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[[toc]] | ||
|
||
<h2>引入</h2> | ||
|
||
```ts | ||
import { loadDotenv } from 't-comm'; | ||
|
||
// or | ||
import { loadDotenv} from 't-comm/lib/dotenv/index'; | ||
``` | ||
|
||
|
||
## `loadDotenv(file, param)` | ||
|
||
|
||
**描述**:<p>用 dotenv-expand 加载环境变量</p> | ||
|
||
**参数**: | ||
|
||
|
||
| 参数名 | 描述 | | ||
| --- | --- | | ||
| file | <p>文件路径,默认 .env.local</p> | | ||
| param | <p>参数</p> | | ||
|
||
|
||
|
||
**示例** | ||
|
||
```ts | ||
loadEnv(); | ||
|
||
loadEnv('.env'); | ||
|
||
loadEnv('.env.local', { | ||
debug: false, // 是否打印日志,默认 true | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.