未验证 提交 16944f3c 编写于 作者: M Matt Bierner 提交者: GitHub

Merge pull request #72553 from tony-xia/makeRandomHexString

Update makeRandomHexString() to remove duplicate character
......@@ -7,7 +7,7 @@ import path = require('path');
import os = require('os');
export function makeRandomHexString(length: number): string {
let chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
const chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
let result = '';
for (let i = 0; i < length; i++) {
const idx = Math.floor(chars.length * Math.random());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册