Skip to content

Commit

Permalink
chore: 本地生成coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
renzp94 committed Jun 1, 2024
1 parent da5906f commit 7359b22
Show file tree
Hide file tree
Showing 11 changed files with 215 additions and 134 deletions.
65 changes: 3 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,20 @@
<p align="center"><a href="https://github.com/renzp94/utils" target="_blank" rel="noopener noreferrer"><img width="200" src="./logo.png" alt="@renzp/utils logo"></a></p>
<p align="center">
<a href="https://github.com/renzp94/utils/coverage.md">
<img src="./coverage.svg" alt="Code coverage">
</a>
<a href="https://bundlephobia.com/package/@renzp/utils">
<img src="https://img.shields.io/bundlephobia/minzip/@renzp/utils?label=minzipped" alt="Bundle Size">
</a>
<a href="https://npmcharts.com/compare/@renzp/utils?minimal=true"><img src="https://img.shields.io/npm/dm/@renzp/utils.svg?sanitize=true" alt="Downloads"></a>
<a href="https://www.npmjs.com/package/@renzp/utils"><img src="https://img.shields.io/npm/v/@renzp/utils.svg?sanitize=true" alt="Version"></a>
<a href="https://www.npmjs.com/package/@renzp/utils"><img src="https://img.shields.io/npm/l/@renzp/utils.svg?sanitize=true" alt="License"></a>
<a href="https://www.jsdocs.io/package/@renzp/utils"><img src="https://img.shields.io/badge/JSDoc-blue" alt="docs"></a>
<a href="https://github.com/renzp94/utils/blob/main/CHANGELOG.md"><img src="https://img.shields.io/badge/更新日志-gray" alt="Change Log"></a>
</p>


# @renzp/utils

一款零依赖、实用的Javascript/Typescript工具库

## coverage

> 由于使用的`bun test`无法生成`coverage`HTML文件,所以在此列一下`coverage`
| File | % Funcs | % Lines |
| -------------------------------- | ------- | ------- |
| All files | 100.00 | 100.00 |
| src/_base.ts | 100.00 | 100.00 |
| src/array/createArray.ts | 100.00 | 100.00 |
| src/array/difference.ts | 100.00 | 100.00 |
| src/array/first.ts | 100.00 | 100.00 |
| src/array/flatten.ts | 100.00 | 100.00 |
| src/array/index.ts | 100.00 | 100.00 |
| src/array/last.ts | 100.00 | 100.00 |
| src/array/unique.ts | 100.00 | 100.00 |
| src/index.ts | 100.00 | 100.00 |
| src/is/index.ts | 100.00 | 100.00 |
| src/is/isArray.ts | 100.00 | 100.00 |
| src/is/isBigint.ts | 100.00 | 100.00 |
| src/is/isBoolean.ts | 100.00 | 100.00 |
| src/is/isDate.ts | 100.00 | 100.00 |
| src/is/isDef.ts | 100.00 | 100.00 |
| src/is/isFalsy.ts | 100.00 | 100.00 |
| src/is/isFunction.ts | 100.00 | 100.00 |
| src/is/isJson.ts | 100.00 | 100.00 |
| src/is/isMap.ts | 100.00 | 100.00 |
| src/is/isNull.ts | 100.00 | 100.00 |
| src/is/isNumber.ts | 100.00 | 100.00 |
| src/is/isObject.ts | 100.00 | 100.00 |
| src/is/isPrimitive.ts | 100.00 | 100.00 |
| src/is/isRefData.ts | 100.00 | 100.00 |
| src/is/isRegExp.ts | 100.00 | 100.00 |
| src/is/isSet.ts | 100.00 | 100.00 |
| src/is/isString.ts | 100.00 | 100.00 |
| src/is/isSymbol.ts | 100.00 | 100.00 |
| src/is/isTruth.ts | 100.00 | 100.00 |
| src/is/isUnDef.ts | 100.00 | 100.00 |
| src/is/isUndefined.ts | 100.00 | 100.00 |
| src/is/isWeakMap.ts | 100.00 | 100.00 |
| src/is/isWeakSet.ts | 100.00 | 100.00 |
| src/number/index.ts | 100.00 | 100.00 |
| src/number/numberSeparate.ts | 100.00 | 100.00 |
| src/object/index.ts | 100.00 | 100.00 |
| src/object/removeKey.ts | 100.00 | 100.00 |
| src/other/deepClone.ts | 100.00 | 100.00 |
| src/other/index.ts | 100.00 | 100.00 |
| src/other/radom.ts | 100.00 | 100.00 |
| src/other/uuid.ts | 100.00 | 100.00 |
| src/validator/emailValidator.ts | 100.00 | 100.00 |
| src/validator/idCardValidator.ts | 100.00 | 100.00 |
| src/validator/index.ts | 100.00 | 100.00 |
| src/validator/numberValidator.ts | 100.00 | 100.00 |
| src/validator/phoneValidator.ts | 100.00 | 100.00 |
| src/validator/telValidator.ts | 100.00 | 100.00 |
| src/validator/zhValidator.ts | 100.00 | 100.00 |
| src/window/copyText.ts | 100.00 | 100.00 |
| src/window/index.ts | 100.00 | 100.00 |
| test/happydom.ts | 100.00 | 100.00 |

## 安装

```sh
Expand Down
56 changes: 56 additions & 0 deletions coverage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# coverage

File | % Funcs | % Lines | Uncovered Line #s
----------------------------------|---------|---------|-------------------
All files | 100.00 | 100.00 |
src/_base.ts | 100.00 | 100.00 |
src/array/createArray.ts | 100.00 | 100.00 |
src/array/difference.ts | 100.00 | 100.00 |
src/array/first.ts | 100.00 | 100.00 |
src/array/flatten.ts | 100.00 | 100.00 |
src/array/index.ts | 100.00 | 100.00 |
src/array/last.ts | 100.00 | 100.00 |
src/array/unique.ts | 100.00 | 100.00 |
src/index.ts | 100.00 | 100.00 |
src/is/index.ts | 100.00 | 100.00 |
src/is/isArray.ts | 100.00 | 100.00 |
src/is/isBigint.ts | 100.00 | 100.00 |
src/is/isBoolean.ts | 100.00 | 100.00 |
src/is/isDate.ts | 100.00 | 100.00 |
src/is/isDef.ts | 100.00 | 100.00 |
src/is/isFalsy.ts | 100.00 | 100.00 |
src/is/isFunction.ts | 100.00 | 100.00 |
src/is/isJson.ts | 100.00 | 100.00 |
src/is/isMap.ts | 100.00 | 100.00 |
src/is/isNull.ts | 100.00 | 100.00 |
src/is/isNumber.ts | 100.00 | 100.00 |
src/is/isObject.ts | 100.00 | 100.00 |
src/is/isPrimitive.ts | 100.00 | 100.00 |
src/is/isRefData.ts | 100.00 | 100.00 |
src/is/isRegExp.ts | 100.00 | 100.00 |
src/is/isSet.ts | 100.00 | 100.00 |
src/is/isString.ts | 100.00 | 100.00 |
src/is/isSymbol.ts | 100.00 | 100.00 |
src/is/isTruth.ts | 100.00 | 100.00 |
src/is/isUnDef.ts | 100.00 | 100.00 |
src/is/isUndefined.ts | 100.00 | 100.00 |
src/is/isWeakMap.ts | 100.00 | 100.00 |
src/is/isWeakSet.ts | 100.00 | 100.00 |
src/number/index.ts | 100.00 | 100.00 |
src/number/numberSeparate.ts | 100.00 | 100.00 |
src/object/index.ts | 100.00 | 100.00 |
src/object/removeKey.ts | 100.00 | 100.00 |
src/other/deepClone.ts | 100.00 | 100.00 |
src/other/index.ts | 100.00 | 100.00 |
src/other/radom.ts | 100.00 | 100.00 |
src/other/uuid.ts | 100.00 | 100.00 |
src/validator/emailValidator.ts | 100.00 | 100.00 |
src/validator/idCardValidator.ts | 100.00 | 100.00 |
src/validator/index.ts | 100.00 | 100.00 |
src/validator/numberValidator.ts | 100.00 | 100.00 |
src/validator/phoneValidator.ts | 100.00 | 100.00 |
src/validator/telValidator.ts | 100.00 | 100.00 |
src/validator/zhValidator.ts | 100.00 | 100.00 |
src/window/copyText.ts | 100.00 | 100.00 |
src/window/index.ts | 100.00 | 100.00 |
test/happydom.ts | 100.00 | 100.00 |
18 changes: 18 additions & 0 deletions coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default async () => {
lastUpdated: true,
metaChunk: true,
rewrites: {
'pages/guide/gettingStarted.md': 'index.md',
'pages/guide/whatIs.md': 'index.md',
'pages/:category/:page.md': ':category/:page.md',
},
head: [['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }]],
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/guide/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default {
text: '简介',
items: [
{ text: '什么是@renzp/utils?', link: '/guide/whatIs' },
{ text: '快速开始', link: '/' },
{ text: '什么是@renzp/utils?', link: '/' },
{ text: '快速开始', link: '/guide/gettingStarted' },
],
sort: 0,
}
81 changes: 20 additions & 61 deletions docs/pages/guide/whatIs.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,22 @@
# 什么是@renzp/utils?
<p align="center">
<a href="https://github.com/renzp94/utils" target="_blank" rel="noopener noreferrer"><img width="200" src="/logo.png" alt="@renzp/utils logo" style="border-radius: 50%;display: inline-block"></a>
</p>
<p align="center">
<a href="https://github.com/renzp94/utils/coverage.md" style="display: inline-block">
<img src="/coverage.svg" alt="Code coverage">
</a>
<a href="https://bundlephobia.com/package/@renzp/utils" style="display: inline-block;margin-left: 4px;">
<img src="https://img.shields.io/bundlephobia/minzip/@renzp/utils?label=minzipped" alt="Bundle Size">
</a>
<a href="https://npmcharts.com/compare/@renzp/utils?minimal=true" style="display: inline-block;margin-left: 4px;">
<img src="https://img.shields.io/npm/dm/@renzp/utils.svg?sanitize=true" alt="Downloads">
</a>
<a href="https://www.npmjs.com/package/@renzp/utils" style="display: inline-block;margin-left: 4px;">
<img src="https://img.shields.io/npm/v/@renzp/utils.svg?sanitize=true" alt="Version">
</a>
<a href="https://www.npmjs.com/package/@renzp/utils" style="display: inline-block;margin-left: 4px;">
<img src="https://img.shields.io/npm/l/@renzp/utils.svg?sanitize=true" alt="License">
</a>
</p>

`@renzp/utils`是一款零依赖、强类型、实用、ESM优先的Javascript/Typescript工具库。

## coverage

> 由于使用的`bun test`无法生成`coverage`HTML文件,所以在此列一下`coverage`

| File | % Funcs | % Lines |
| -------------------------------- | ------- | ------- |
| All files | 100.00 | 100.00 |
| src/_base.ts | 100.00 | 100.00 |
| src/array/createArray.ts | 100.00 | 100.00 |
| src/array/difference.ts | 100.00 | 100.00 |
| src/array/first.ts | 100.00 | 100.00 |
| src/array/flatten.ts | 100.00 | 100.00 |
| src/array/index.ts | 100.00 | 100.00 |
| src/array/last.ts | 100.00 | 100.00 |
| src/array/unique.ts | 100.00 | 100.00 |
| src/index.ts | 100.00 | 100.00 |
| src/is/index.ts | 100.00 | 100.00 |
| src/is/isArray.ts | 100.00 | 100.00 |
| src/is/isBigint.ts | 100.00 | 100.00 |
| src/is/isBoolean.ts | 100.00 | 100.00 |
| src/is/isDate.ts | 100.00 | 100.00 |
| src/is/isDef.ts | 100.00 | 100.00 |
| src/is/isFalsy.ts | 100.00 | 100.00 |
| src/is/isFunction.ts | 100.00 | 100.00 |
| src/is/isJson.ts | 100.00 | 100.00 |
| src/is/isMap.ts | 100.00 | 100.00 |
| src/is/isNull.ts | 100.00 | 100.00 |
| src/is/isNumber.ts | 100.00 | 100.00 |
| src/is/isObject.ts | 100.00 | 100.00 |
| src/is/isPrimitive.ts | 100.00 | 100.00 |
| src/is/isRefData.ts | 100.00 | 100.00 |
| src/is/isRegExp.ts | 100.00 | 100.00 |
| src/is/isSet.ts | 100.00 | 100.00 |
| src/is/isString.ts | 100.00 | 100.00 |
| src/is/isSymbol.ts | 100.00 | 100.00 |
| src/is/isTruth.ts | 100.00 | 100.00 |
| src/is/isUnDef.ts | 100.00 | 100.00 |
| src/is/isUndefined.ts | 100.00 | 100.00 |
| src/is/isWeakMap.ts | 100.00 | 100.00 |
| src/is/isWeakSet.ts | 100.00 | 100.00 |
| src/number/index.ts | 100.00 | 100.00 |
| src/number/numberSeparate.ts | 100.00 | 100.00 |
| src/object/index.ts | 100.00 | 100.00 |
| src/object/removeKey.ts | 100.00 | 100.00 |
| src/other/deepClone.ts | 100.00 | 100.00 |
| src/other/index.ts | 100.00 | 100.00 |
| src/other/radom.ts | 100.00 | 100.00 |
| src/other/uuid.ts | 100.00 | 100.00 |
| src/validator/emailValidator.ts | 100.00 | 100.00 |
| src/validator/idCardValidator.ts | 100.00 | 100.00 |
| src/validator/index.ts | 100.00 | 100.00 |
| src/validator/numberValidator.ts | 100.00 | 100.00 |
| src/validator/phoneValidator.ts | 100.00 | 100.00 |
| src/validator/telValidator.ts | 100.00 | 100.00 |
| src/validator/zhValidator.ts | 100.00 | 100.00 |
| src/window/copyText.ts | 100.00 | 100.00 |
| src/window/index.ts | 100.00 | 100.00 |
| test/happydom.ts | 100.00 | 100.00 |
18 changes: 18 additions & 0 deletions docs/public/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
"description": "一款零依赖、实用的Javascript/Typescript工具库",
"type": "module",
"main": "dist/index.js",
"files": [
"dist"
],
"files": ["dist", "./coverage.svg"],
"types": "dist/index.d.ts",
"author": "renzp <1074720760.qq.com>",
"repository": {
Expand All @@ -17,9 +15,7 @@
"bugs": {
"url": "https://github.com/renzp94/utils/issues"
},
"keywords": [
"utils"
],
"keywords": ["utils"],
"license": "MIT",
"publishConfig": {
"registry": "https://registry.npmjs.org",
Expand All @@ -32,7 +28,8 @@
"pub:all": "bun run scripts/pub-all.ts",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
"docs:preview": "vitepress preview docs",
"coverage": "bun run scripts/coverage.ts"
},
"devDependencies": {
"@biomejs/biome": "^1.7.0",
Expand Down
Loading

0 comments on commit 7359b22

Please sign in to comment.