摘要:
在开发过程中,有时候需要js生成全局唯一标识符,在java中可以使用uuid,但是JS中没有现成的函数。 总结了一下,JS生成唯一标识符的几种方法。 第一种: function uuid() { var s = []; var hexDigits = "0123456789abcdef"; for 阅读全文
摘要:
import * as fs from 'fs' import * as http from 'http' import * as iconv from 'iconv-lite' import path from 'path' import openapiTS from 'openapi-types 阅读全文
摘要:
let result = [] let objT = {} for (var i = 0; i < Obj.value.planCode.length; i++) { if (!objT[Obj.value.planCode[i].key]) { result.push(Obj.value.plan 阅读全文
摘要:
function deepCopy(target) { let result; if (Object.prototype.toString.call(target) "[object Array]") { result = []; target.forEach((element) ⇒ { resul 阅读全文