MCPcopy Create free account
hub / github.com/baiwumm/react-admin / generateRandomHanziArray

Function generateRandomHanziArray

Xmw_web/src/utils/index.ts:272–283  ·  view source on GitHub ↗
(count = 1)

Source from the content-addressed store, hash-verified

270 * @param {number} count
271 */
272export const generateRandomHanziArray = (count = 1) => {
273 const minCode = 0x4e00; // 汉字 Unicode 范围的最小值
274 const maxCode = 0x9fff; // 汉字 Unicode 范围的最大值
275
276 const hanziArray = [];
277 for (let i = 0; i < count; i++) {
278 const randomCode = random(minCode, maxCode);
279 hanziArray.push(String.fromCodePoint(randomCode));
280 }
281
282 return hanziArray;
283};
284
285/** @description: 浏览器图标映射 */
286export const BroswerIconMap = (text: string): string | undefined => {

Callers 1

drawImgFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected