1 view
dream-num/univer
Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript★ 29,190+1,774 that day#4 on trending
D54.6/100
Duplication38
12% in typescript, tsx, javascriptDead code70
3.9%Complexity62
34.7% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
7.79%duplicated code · 43,600 of 559,892 lines
2,611clones in code
3,124code files of 6,358 scanned
12.85%duplicated over all files · 11,110 clones
Most complex files
- packages/engine-render/src/components/docs/layout/doc-skeleton.ts1305 cx
- packages/engine-render/src/components/docs/layout/__tests__/doc-skeleton.spec.ts976 cx
- packages/engine-render/src/components/docs/layout/block/paragraph/layout-ruler.ts971 cx
- packages/engine-render/src/components/docs/layout/block/paragraph/__tests__/layout-ruler.spec.ts647 cx
- packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts520 cx
- packages/engine-render/src/components/docs/layout/tools.ts504 cx
- packages/engine-render/src/components/docs/layout/block/paragraph/__tests__/linebreaking.spec.ts502 cx
- packages/docs-ui/src/controllers/render-controllers/doc.render-controller.ts473 cx
- packages/engine-render/src/components/sheets/spreadsheet.ts473 cx
- packages/sheets-drawing-ui/src/services/canvas-float-dom-manager.service.ts467 cx
Dead code 3.88% unused · 767 findings
- packages/sheets-ui/src/locale/ca-ES.tsunused-file
- packages/sheets-ui/src/locale/de-DE.tsunused-file
- packages/sheets-ui/src/locale/es-ES.tsunused-file
- packages/sheets-ui/src/locale/fa-IR.tsunused-file
- packages/sheets-ui/src/locale/fr-FR.tsunused-file
- packages/sheets-ui/src/locale/id-ID.tsunused-file
- packages/sheets-ui/src/locale/it-IT.tsunused-file
- packages/sheets-ui/src/locale/ja-JP.tsunused-file
- packages/sheets-ui/src/locale/ko-KR.tsunused-file
- packages/sheets-ui/src/locale/pl-PL.tsunused-file
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code, and 1 generated file: common/debugger/src/components/Image.tsx.
Largest clones in the code
- 363 lines in 2 placestsx2,319 tokenspackages/sheets-hyper-link-ui/src/views/CellLinkEdit.tsx:65–427packages/sheets-hyper-link-ui/src/views/MobileCellLinkEdit.tsx:65–427
65export const CellLinkEdit = () => { 66 const [id, setId] = useState(''); 67 const [display, setDisplay] = useState(''); 68 const [tooltip, setTooltip] = useState(''); 69 const [showLabel, setShowLabel] = useState(true); 70 const [type, setType] = useState<SheetHyperLinkType | string>(SheetHyperLinkType.URL); 71 const [payload, setPayload] = useState(''); 72 73 const localeService = useDependency(LocaleService); 74 const definedNameService = useDependency(IDefinedNamesService);First 10 of 363 lines.
- 23 lines in 13 placestypescript110 tokenspackages/engine-formula/src/functions/engineering/imabs/index.ts:25–47packages/engine-formula/src/functions/engineering/imaginary/index.ts:25–47packages/engine-formula/src/functions/engineering/imconjugate/index.ts:26–48packages/engine-formula/src/functions/engineering/imcos/index.ts:26–48packages/engine-formula/src/functions/engineering/imcosh/index.ts:26–48and 8 more
25export class Imabs extends BaseFunction { 26 override minParams = 1; 27 28 override maxParams = 1; 29 30 override calculate(inumber: BaseValueObject): BaseValueObject { 31 const { isError, errorObject, variants } = checkVariantsErrorIsArrayOrBoolean(inumber); 32 33 if (isError) { 34 return errorObject as ErrorValueObject;First 10 of 23 lines.
- 202 lines in 2 placestypescript1,236 tokenspackages/docs-drawing-ui/src/controllers/mobile/drawing-popup-menu.controller.ts:97–298packages/docs-drawing-ui/src/menu/drawing-popup-menu.controller.ts:128–328
97 if (command.id === SidebarDocDrawingMobileOperation.id) { 98 const params = command.params as { value?: string } | undefined; 99 this._isDrawingPanelOpen = params?.value === 'open'; 100 if (this._isDrawingPanelOpen) { 101 this._clearPopups(undefined, true); 102 } 103 } 104 }) 105); 106this.disposeWithMe(First 10 of 202 lines.
7 more
- 10 lines in 21 placestypescript61 tokenspackages/engine-formula/src/functions/engineering/imconjugate/index.ts:17–26packages/engine-formula/src/functions/engineering/imcos/index.ts:17–26packages/engine-formula/src/functions/engineering/imcosh/index.ts:17–26packages/engine-formula/src/functions/engineering/imcot/index.ts:17–26packages/engine-formula/src/functions/engineering/imcoth/index.ts:17–26and 16 more
- 45 lines in 5 placestypescript259 tokenspackages/engine-formula/src/functions/financial/coupdaybs/index.ts:27–71packages/engine-formula/src/functions/financial/coupdays/index.ts:26–70packages/engine-formula/src/functions/financial/coupdaysnc/index.ts:26–70packages/engine-formula/src/functions/financial/coupncd/index.ts:26–70packages/engine-formula/src/functions/financial/coupnum/index.ts:27–71
- 21 lines in 10 placestypescript105 tokenspackages/engine-formula/src/functions/engineering/imabs/index.ts:25–45packages/engine-formula/src/functions/engineering/imargument/index.ts:25–45packages/engine-formula/src/functions/engineering/imcot/index.ts:26–46packages/engine-formula/src/functions/engineering/imcoth/index.ts:26–46packages/engine-formula/src/functions/engineering/imcsc/index.ts:26–46and 5 more
- 17 lines in 15 placestypescript60 tokenspackages/engine-formula/src/functions/math/abs/index.ts:20–36packages/engine-formula/src/functions/math/acos/index.ts:20–36packages/engine-formula/src/functions/math/acosh/index.ts:20–35packages/engine-formula/src/functions/math/asin/index.ts:20–36packages/engine-formula/src/functions/math/asinh/index.ts:20–36and 10 more
- 25 lines in 8 placestypescript119 tokenspackages/engine-formula/src/functions/database/daverage/index.ts:24–48packages/engine-formula/src/functions/database/dcount/index.ts:22–46packages/engine-formula/src/functions/database/dcounta/index.ts:22–46packages/engine-formula/src/functions/database/dget/index.ts:24–48packages/engine-formula/src/functions/database/dmax/index.ts:22–46and 3 more
- 67 lines in 3 placestypescript407 tokens
- 45 lines in 5 placestypescript202 tokenspackages/engine-formula/src/functions/engineering/bin2hex/index.ts:25–69packages/engine-formula/src/functions/engineering/hex2bin/index.ts:25–69packages/engine-formula/src/functions/engineering/hex2oct/index.ts:25–69packages/engine-formula/src/functions/engineering/oct2bin/index.ts:25–69packages/engine-formula/src/functions/engineering/oct2hex/index.ts:25–69
Largest clones over all files, tests and data included
- 7 lines in 191 placestypescripttests56 tokenspackages/engine-formula/src/functions/array/array-constrain/__tests__/index.spec.ts:17–23packages/engine-formula/src/functions/compatibility/betadist/__tests__/index.spec.ts:17–23packages/engine-formula/src/functions/compatibility/hypgeomdist/__tests__/index.spec.ts:17–23packages/engine-formula/src/functions/compatibility/lognormdist/__tests__/index.spec.ts:17–23packages/engine-formula/src/functions/compatibility/negbinomdist/__tests__/index.spec.ts:17–23and 186 more
17import { describe, expect, it } from 'vitest'; 18import { ErrorType } from '../../../../basics/error-type'; 19import { ArrayValueObject, transformToValueObject } from '../../../../engine/value-object/array-value-object'; 20import { ErrorValueObject } from '../../../../engine/value-object/base-value-object'; 21import { BooleanValueObject, NullValueObject, NumberValueObject, StringValueObject } from '../../../../engine/value-object/primitive-object'; 22import { getObjectValue } from '../../../util'; 23import { FUNCTION_NAMES_ARRAY } from '../../function-names';17import { describe, expect, it } from 'vitest'; 18import { ErrorType } from '../../../../basics/error-type'; 19import { ArrayValueObject, transformToValueObject } from '../../../../engine/value-object/array-value-object'; 20import { ErrorValueObject } from '../../../../engine/value-object/base-value-object'; 21import { BooleanValueObject, NullValueObject, NumberValueObject, StringValueObject } from '../../../../engine/value-object/primitive-object'; 22import { getObjectValue } from '../../../util'; 23import { FUNCTION_NAMES_COMPATIBILITY } from '../../function-names'; - 152 lines in 8 placesmermaiddocs and examples901 tokensREADME.md:396–547docs/readme/de-DE.md:396–547docs/readme/es-ES.md:396–547docs/readme/fr-FR.md:396–547docs/readme/ja-JP.md:396–547and 3 more
396%%{init: {'htmlLabels': false, 'theme': 'base', 'themeVariables': {'fontFamily': 'Arial, PingFang SC, Microsoft YaHei, sans-serif', 'fontSize': '17px', 'lineCo… 397%% A layered overview, not a complete dependency graph. 398%% Group arrows indicate reuse of the layer below; internal arrows show selected dependencies. 399flowchart TD 400 subgraph FEATURES["Feature Plugins"] 401 direction LR 402 FUI["Filter<br/>UI Plugin"] 403 VUI["Data Validation<br/>UI Plugin"] 404 FILTER["Filter Plugin"] 405 VALIDATION["Data Validation Plugin"]First 10 of 152 lines.
- 173 lines in 8 placestypescriptdocs and examples631 tokensREADME.md:202–374docs/readme/de-DE.md:202–374docs/readme/es-ES.md:202–374docs/readme/fr-FR.md:202–374docs/readme/ja-JP.md:202–374and 3 more
202import { UniverSheetsCorePreset } from '@univerjs/preset-sheets-core' 203import UniverPresetSheetsCoreEnUS from '@univerjs/preset-sheets-core/locales/en-US' 204import { createUniver, LocaleType, mergeLocales } from '@univerjs/presets' 205import '@univerjs/preset-sheets-core/lib/index.css' 206 207const { univerAPI } = createUniver({ 208 locale: LocaleType.EN_US, 209 locales: { 210 [LocaleType.EN_US]: mergeLocales(UniverPresetSheetsCoreEnUS), 211 },First 10 of 173 lines.
- 8 lines in 71 placestypescripttests56 tokenspackages/engine-formula/src/functions/statistical/avedev/__tests__/index.spec.ts:17–24packages/engine-formula/src/functions/statistical/average/__tests__/index.spec.ts:17–24packages/engine-formula/src/functions/statistical/averagea/__tests__/index.spec.ts:17–24packages/engine-formula/src/functions/statistical/beta-dist/__tests__/index.spec.ts:17–24packages/engine-formula/src/functions/statistical/beta-inv/__tests__/index.spec.ts:17–24and 66 more
- 17 lines in 74 placesjsondata files50 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 2,695 | 484,368 | 2,411 | 40,058 | 8.27% |
| tsx | 427 | 75,408 | 200 | 3,542 | 4.7% |
| javascript | 2 | 116 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 5,478 | 1,171,175 | 9,652 | 144,613 | 12.35% |
| tsx | 632 | 123,373 | 771 | 11,232 | 9.1% |
| json | 97 | 9,352 | 355 | 9,058 | 96.86% |
| markdown | 99 | 16,128 | 238 | 3,525 | 21.86% |
| markup | 6 | 1,100 | 70 | 740 | 67.27% |
| mermaid | 8 | 776 | 7 | 679 | 87.5% |
| bash | 10 | 98 | 7 | 70 | 71.43% |
| text | 8 | 48 | 7 | 42 | 87.5% |
| yaml | 15 | 852 | 3 | 46 | 5.4% |
| css | 1 | 227 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Nov 18, 2026 | #4 | 29,190 (+1,774) | 6,358 | 1,323,307 | 11,110 | 12.85% | 7.79% | D 54.6 | 6c6ce38 |
| Nov 17, 2026 | #3 | 27,952 (+1,828) | 6,352 | 1,320,516 | 11,104 | 12.87% | 7.8% | D 54.6 | 1aafe93 |
| Nov 16, 2026 | #1 | 26,497 (+988) | 6,328 | 1,318,168 | 11,095 | 12.89% | 7.82% | D 54.5 | 35e957d |
| Nov 15, 2026 | #6 | 25,043 (+495) | 6,328 | 1,318,168 | 11,095 | 12.89% | 7.82% | D 54.5 | 0d7923d |
| Sep 30, 2026 | #10 | 21,961 (+696) | 6,217 | 1,262,424 | 10,820 | 13.28% | 8.19% | C 60.6 | c3c448f |
| Sep 29, 2026 | #7 | 21,409 (+1,099) | 6,217 | 1,261,958 | 10,819 | 13.28% | 8.19% | C 60.6 | 14bb44a |
| Sep 28, 2026 | #6 | 20,740 (+895) | 6,218 | 1,261,323 | 10,821 | 13.29% | 8.19% | C 60.6 | ee793e1 |
| Sep 27, 2026 | #3 | 19,668 (+849) | 6,218 | 1,260,600 | 10,817 | 13.3% | 8.19% | C 60.6 | 1defaf4 |
| Sep 26, 2026 | #3 | 18,773 (+1,050) | 6,218 | 1,260,600 | 10,817 | 13.3% | 8.19% | C 60.6 | 1defaf4 |
| Sep 25, 2026 | #1 | 17,938 (+1,082) | 6,218 | 1,260,600 | 10,817 | 13.3% | 8.19% | C 60.6 | 1defaf4 |
| Sep 24, 2026 | #4 | 16,479 (+1,142) | 6,218 | 1,260,599 | 10,817 | 13.3% | 8.19% | C 60.6 | a58c5a1 |
| Sep 23, 2026 | #3 | 15,723 (+255) | 6,216 | 1,260,342 | 10,818 | 13.3% | 8.19% | C 62 | d31d624 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.