Skip to content

feat(dt-utils): refactor the dt-utils #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
50d84ab
chore: upgrade package & replace packaging tools
jin-sir Jun 22, 2025
9131eef
refactor: remove old functions
jin-sir Jun 22, 2025
82a4a25
refactor: rename browserCheck to checkBrowserSupport
jin-sir Jun 22, 2025
9963d6a
refactor: improve copy
jin-sir Jun 22, 2025
5f4b0bd
refactor: rename downLoadData to downloadFile
jin-sir Jun 22, 2025
58a28e5
refactor: rename convertBytes to formatBytes
jin-sir Jun 22, 2025
49bc19b
refactor: rename dateTime to formatDateTime
jin-sir Jun 22, 2025
492de08
feat: add formatSecond
jin-sir Jun 22, 2025
7157840
feat: add formatBase64
jin-sir Jun 22, 2025
bc628b4
refactor: rename generateFullUrlPath to generateUrlWithQuery
jin-sir Jun 22, 2025
ee4e777
refactor: merge generateAKey and getRandomStr into getKey
jin-sir Jun 22, 2025
8530435
refactor: improve getQueryParameters
jin-sir Jun 22, 2025
5cff92d
feat: add getTypeOfValue
jin-sir Jun 22, 2025
56ba7cc
refactor: improve isMacOS
jin-sir Jun 22, 2025
1705964
refactor: improve isMobile
jin-sir Jun 22, 2025
8df8b0e
refactor: improve isWindows
jin-sir Jun 22, 2025
d8eb0bd
refactor: localDB.set support batch set, localDB.clear support except…
jin-sir Jun 22, 2025
d35ca34
refactor: improve LocalIndexedDB
jin-sir Jun 22, 2025
1744d5b
feat: add sessionDB
jin-sir Jun 22, 2025
3166fec
feat: add shouldRender
jin-sir Jun 22, 2025
c20cf9d
refactor: merge getBase64 and base64Encode into toBase64
jin-sir Jun 22, 2025
a2774db
refactor: rename percent to toPercent
jin-sir Jun 22, 2025
4dea50d
refactor: rename exchangeOrder to toSortOrder
jin-sir Jun 22, 2025
20c180a
refactor: rename getThousandth to toThousand
jin-sir Jun 22, 2025
fb7148e
feat: add unit testing
jin-sir Jun 22, 2025
3f9cee2
chore: add entry file
jin-sir Jun 22, 2025
f5e2bf1
chore: remove docs
jin-sir Jun 22, 2025
44587fe
refactor: build site with VitePress and generate documentation using …
jin-sir Jun 22, 2025
2e8f0a5
chore: add docs:deploy script
jin-sir Jun 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 3 additions & 100 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,111 +1,14 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

dist
lib
temp

# ide
# .vscode
.idea
.vscode
.DS_Store
8 changes: 0 additions & 8 deletions .vscode/extensions.json

This file was deleted.

42 changes: 0 additions & 42 deletions .vscode/settings.json

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# dt-utils | <a href="./docs/CHANGELOG.md" target="_black">CHANGELOG</a>
# dt-utils | <a href="./CHANGELOG.md" target="_black">CHANGELOG</a>
工具库
## 安装依赖
```bash
npm install @dtinsight/dt-utils
yarn add @dtinsight/dt-utils
pnpm install @dtinsight/dt-utils
```
## 文档地址
## 文档地址
- [在线文档](https://dtstack.github.io/dt-utils/)

## 使用

````js
import { Utils, Cookie, DateTime, Layout, CopyUtils, LocalIndexedDB, LocalDB } from '@dtinsight/dt-utils';
import { checkBrowserSupport, toPercent, Cookie } from '@dtinsight/dt-utils';
````


Expand Down
16 changes: 0 additions & 16 deletions api-extractor.json

This file was deleted.

5 changes: 1 addition & 4 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
module.exports = {
extends: [
'./node_modules/vue-cli-plugin-commitlint/lib/lint',
'@commitlint/config-conventional',
],
extends: ['@commitlint/config-conventional'],
};
Empty file removed docs/.nojekyll
Empty file.
35 changes: 35 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { defineConfig } from 'vitepress';

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'Dt-utils',
description: '袋鼠云前端常用工具库',
base: '/dt-utils/',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Guide', link: '/quickstart' },
{ text: 'Documents', link: '/api/globals' },
],
sidebar: [
{
text: 'Guide',
items: [
{ text: 'Quick Start', link: '/quickstart' },
{ text: 'contribution', link: '/contribution' },
],
},
{
text: 'Functions',
link: '/api/globals',
items: [...require('../api/typedoc-sidebar.json')],
},
{
text: 'CHANGELOG',
link: '/api/_media/CHANGELOG',
},
],

socialLinks: [{ icon: 'github', link: 'https://github.com/DTStack/dt-utils' }],
},
});
2 changes: 0 additions & 2 deletions docs/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/_sidebar.md

This file was deleted.

Loading