dream-num/univer
The Office Harness for AI Agents — Spreadsheets, Docs, Slides, Canvas, Relational Tables, and PDF in one runtime.
TypeScript★ 21,961+696 that day#10 on trending
C60.6/100
Duplication36
12.4% in typescript, tsx, bash, perl, javascriptDead code96
0.4%Complexity64
32.5% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
8.19%duplicated code · 45,039 of 550,199 lines
2,683clones in code
3,117code files of 6,217 scanned
13.28%duplicated over all files · 10,820 clones
Most complex files
- packages/engine-render/src/components/docs/layout/doc-skeleton.ts1245 cx
- packages/engine-render/src/components/docs/layout/block/paragraph/layout-ruler.ts919 cx
- packages/engine-render/src/components/docs/layout/__tests__/doc-skeleton.spec.ts875 cx
- packages/engine-render/src/components/docs/layout/block/paragraph/__tests__/layout-ruler.spec.ts608 cx
- packages/engine-formula/src/engine/analysis/lexer-tree-builder.ts533 cx
- packages/engine-render/src/components/docs/layout/block/paragraph/__tests__/linebreaking.spec.ts502 cx
- packages/engine-render/src/components/docs/layout/tools.ts501 cx
- packages/docs-ui/src/controllers/render-controllers/doc.render-controller.ts465 cx
- packages/engine-render/src/components/docs/layout/block/paragraph/linebreaking.ts450 cx
- packages/sheets-drawing-ui/src/services/canvas-float-dom-manager.service.ts430 cx
Dead code 0.42% unused · 287 findings
- packages/slides/src/basics/demo-data.tsunused-file
- packages/engine-render/src/components/docs/layout/hyphenation/patterns/af.tsunused-file
- packages/engine-render/src/components/docs/layout/hyphenation/patterns/ru.tsunused-file
- packages/engine-render/src/components/docs/layout/hyphenation/patterns/sr-cyrl.tsunused-file
- packages/engine-render/src/components/docs/layout/hyphenation/patterns/sh-cyrl.tsunused-file
- packages/engine-render/src/components/docs/layout/hyphenation/patterns/sh-latn.tsunused-file
- packages/docs/src/services/doc-view-model-manager.service.tsunused-file
- packages/engine-render/src/components/docs/layout/hyphenation/patterns/nb.tsunused-file
- packages/engine-render/src/components/docs/layout/hyphenation/patterns/nn.tsunused-file
- packages/engine-render/src/components/docs/layout/hyphenation/patterns/no.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
- 371 lines in 2 placestsx2,372 tokenspackages/sheets-hyper-link-ui/src/views/CellLinkEdit.tsx:65–435packages/sheets-hyper-link-ui/src/views/MobileCellLinkEdit.tsx:65–435
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 371 lines.
- 23 lines in 13 placestypescript104 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:99–300packages/docs-drawing-ui/src/menu/drawing-popup-menu.controller.ts:100–300
99 if (command.id === SidebarDocDrawingMobileOperation.id) { 100 const params = command.params as { value?: string } | undefined; 101 this._isDrawingPanelOpen = params?.value === 'open'; 102 if (this._isDrawingPanelOpen) { 103 this._clearPopups(undefined, true); 104 } 105 } 106 }) 107); 108this.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 placestypescript99 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
- 160 lines in 2 placestsx850 tokens
- 11 lines in 17 placestypescript53 tokenspresets/packages/preset-docs-core/tailwind.config.ts:17–27presets/packages/preset-docs-drawing/tailwind.config.ts:17–27presets/packages/preset-docs-hyper-link/tailwind.config.ts:17–27presets/packages/preset-docs-node-core/tailwind.config.ts:17–27presets/packages/preset-docs-thread-comment/tailwind.config.ts:17–27and 12 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
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'; - 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
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_STATISTICAL } from '../../function-names'; 24import { Avedev } from '../index';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_STATISTICAL } from '../../function-names'; 24import { Average } from '../index'; - 17 lines in 78 placesjsondata files50 tokenspackages/action-recorder/package.json:5–21packages/core/package.json:5–21packages/data-validation/package.json:5–21packages/design/package.json:5–21packages/docs-drawing-ui/package.json:5–21and 73 more
5"description": "Record and replay user actions in Univer.", 6"author": "DreamNum Co., Ltd. <[email protected]>", 7"license": "Apache-2.0", 8"funding": { 9 "type": "opencollective", 10 "url": "https://opencollective.com/univer" 11}, 12"homepage": "https://univer.ai", 13"repository": { 14 "type": "git",First 10 of 17 lines.
- 8 lines in 48 placestypescripttests56 tokenspackages/engine-formula/src/functions/math/acos/__tests__/index.spec.ts:17–24packages/engine-formula/src/functions/math/acosh/__tests__/index.spec.ts:17–24packages/engine-formula/src/functions/math/acot/__tests__/index.spec.ts:17–24packages/engine-formula/src/functions/math/acoth/__tests__/index.spec.ts:17–24packages/engine-formula/src/functions/math/arabic/__tests__/index.spec.ts:17–24and 43 more
- 51 lines in 12 placestypescripttests238 tokenspackages/engine-formula/src/functions/compatibility/rank/__tests__/index.spec.ts:113–163packages/engine-formula/src/functions/lookup/offset/__tests__/index.spec.ts:137–187packages/engine-formula/src/functions/math/randarray/__tests__/index.spec.ts:133–183packages/engine-formula/src/functions/math/sequence/__tests__/index.spec.ts:131–181packages/engine-formula/src/functions/math/sumif/__tests__/index.spec.ts:142–192and 7 more
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 2,692 | 476,748 | 2,482 | 41,339 | 8.67% |
| tsx | 413 | 72,517 | 201 | 3,700 | 5.1% |
| bash | 9 | 644 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
| javascript | 2 | 116 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| typescript | 5,400 | 1,123,583 | 9,465 | 143,560 | 12.78% |
| tsx | 570 | 114,721 | 724 | 10,994 | 9.58% |
| json | 100 | 9,649 | 384 | 9,726 | 100.8% |
| markdown | 99 | 11,223 | 169 | 2,509 | 22.36% |
| markup | 6 | 1,096 | 70 | 740 | 67.52% |
| bash | 17 | 698 | 5 | 30 | 4.3% |
| yaml | 15 | 852 | 3 | 46 | 5.4% |
| css | 1 | 226 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
| javascript | 2 | 116 | 0 | 0 | 0% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| 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.