Skip to content

Commit

Permalink
发布v1.11.0版本
Browse files Browse the repository at this point in the history
  • Loading branch information
chenbimo committed Nov 29, 2024
1 parent 2f39ac9 commit 22ac3c8
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 102 deletions.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions lib/crypto/nanoid.js → lib/crypto/nanoid_node.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { webcrypto as crypto } from 'node:crypto';
const POOL_SIZE_MULTIPLIER = 128;
const urlAlphabet = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
// 去掉了-和_,更好复制
const urlAlphabet = 'useandom26T198340PX75pxJACKVERYMINDBUSHWOLFGQZbfghjklqvwyzrict';
let pool, poolOffset;
function fillPool(bytes) {
if (!pool || pool.length < bytes) {
Expand All @@ -15,12 +16,12 @@ function fillPool(bytes) {
}

/**
* @alias yd_number_nanoid
* @alias yd_crypto_nanoid_node
* @category number
* @param {number} size 随机支付长度
* @returns {string} 返回唯一字符
* @author https://github.com/ai/nanoid
* @example yd_number_nanoid() // duuiauf8827ad8888adfaf
* @example yd_crypto_nanoid_node() // duuiauf8827ad8888adfaf
*/
export default (size = 21) => {
fillPool((size -= 0));
Expand Down
File renamed without changes.
68 changes: 0 additions & 68 deletions lib/number/thousands.js

This file was deleted.

15 changes: 0 additions & 15 deletions lib/number/toBits.js

This file was deleted.

27 changes: 11 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "yidash",
"type": "module",
"version": "1.10.0",
"version": "1.11.0",
"private": false,
"license": "MIT",
"description": "yidash(易大师)一万个JavaScript实用方法库",
Expand All @@ -23,22 +23,17 @@
],
"exports": {
".": "./lib.js",
"./node": "./libNode.js",
"./libNames": "./libNames.js",
"./libNodeNames": "./libNodeNames.js"
"./libNames": "./libNames.js"
},
"files": [
"config/",
"lib/",
"libNode/",
"index.js",
"LICENSE",
"package.json",
"README.md",
"lib.js",
"libNames.js",
"libNode.js",
"libNodeNames.js"
"libNames.js"
],
"scripts": {
"gen": "node generate.js",
Expand All @@ -52,28 +47,28 @@
},
"dependencies": {
"date-fns": "^4.1.0",
"es-toolkit": "^1.26.1"
"es-toolkit": "^1.27.0"
},
"devDependencies": {
"@eslint/config-inspector": "^0.5.6",
"@eslint/js": "^9.14.0",
"@vitest/ui": "^2.1.4",
"@eslint/js": "^9.15.0",
"@vitest/ui": "^2.1.6",
"colorette": "^2.0.20",
"del-cli": "^6.0.0",
"docdash-extended-chensuiyi": "^1.1.1",
"eslint": "^9.14.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^50.4.3",
"eslint-plugin-jsdoc": "^50.6.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-regexp": "^2.6.0",
"eslint-plugin-regexp": "^2.7.0",
"fs-extra": "^11.2.0",
"globals": "^15.12.0",
"jsdoc": "^4.0.4",
"lint-staged": "^15.2.10",
"log-symbols": "^7.0.0",
"prettier": "^3.3.3",
"prettier": "^3.4.1",
"simple-git-hooks": "^2.11.1",
"vitest": "^2.1.4"
"vitest": "^2.1.6"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged"
Expand Down

0 comments on commit 22ac3c8

Please sign in to comment.