* Escape special regex characters in a string
(str: string)
| 35 | * Escape special regex characters in a string |
| 36 | */ |
| 37 | function escapeRegExp(str: string): string { |
| 38 | return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') |
| 39 | } |
| 40 | |
| 41 | // 计算新项目的插入位置和 order,并更新同级项目的 order |
| 42 | async function prepareInsertPosition(afterItemId?: string): Promise<{ |
no outgoing calls
no test coverage detected