Skip to content
On this page

generateRandomString ​

生成一个指定长度的随机字符串,并将其作为结果返回

引入方式 ​

ESM ​

javascript
import { generateRandomString } from "tool-assistant;

示例 ​

javascript
// 引入 generateRandomString 函数
import { generateRandomString } from "tool-assistant";

const randomString = generateRandomString(8);
console.log(randomString);

Released under the MIT License.