前后端全面升级

This commit is contained in:
pycook
2023-07-10 17:42:15 +08:00
parent c444fed436
commit db5ff60aff
629 changed files with 97789 additions and 23995 deletions

View File

@@ -0,0 +1,41 @@
/* eslint-disable */
export function intersection(thisSet, otherSet) {
//初始化一个新集合用于表示交集
var interSectionSet = new Set()
var values = Array.from(thisSet)
for (var i = 0; i < values.length; i++) {
if (otherSet.has(values[i])) {
interSectionSet.add(values[i])
}
}
return interSectionSet
}
export function union(thisSet, otherSet) {
var unionSet = new Set()
var values = Array.from(thisSet)
for (var i = 0; i < values.length; i++) {
unionSet.add(values[i])
}
values = Array.from(otherSet)
for (var i = 0; i < values.length; i++) {
unionSet.add(values[i])
}
return unionSet
}
export function difference(thisSet, otherSet) {
var differenceSet = new Set()
var values = Array.from(thisSet)
for (var i = 0; i < values.length; i++) {
if (!otherSet.has(values[i])) {
differenceSet.add(values[i])
}
}
return differenceSet
}