MCPcopy Create free account
hub / github.com/DTStack/Taier / unique

Function unique

taier-ui/scripts/getSwagger.js:60–67  ·  view source on GitHub ↗
(arr = [])

Source from the content-addressed store, hash-verified

58 * @param {Array} arr
59 */
60const unique = (arr = []) => {
61 const obj = {};
62 const result = arr.reduce((item, next) => {
63 obj[next.operationId] ? '' : (obj[next.operationId] = true && item.push(next));
64 return item;
65 }, []);
66 return result;
67};
68
69/**
70 * @description 字符串专成驼峰命名

Callers 1

handleResolveArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected