MCPcopy Create free account
hub / github.com/MisterBooo/LeetCodeAnimation / normalize

Function normalize

tools/scripts/review-site-changes.js:48–57  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

46}
47
48function normalize(item) {
49 return {
50 leetcodeId: item.num,
51 sourcePid: item.pid,
52 slug: item.slug,
53 titleZh: item.title,
54 difficulty: difficulty(item.diff),
55 categoryZh: item.cat,
56 };
57}
58
59function itemLabel(item) {
60 return `#${item.leetcodeId} ${item.titleZh} (${item.slug})`;

Callers

nothing calls this directly

Calls 1

difficultyFunction · 0.70

Tested by

no test coverage detected