MCPcopy Create free account
hub / github.com/astercloud/aster / removeData

Function removeData

ui/src/protocol/path-resolver.ts:504–515  ·  view source on GitHub ↗
(data: DataMap, path: string)

Source from the content-addressed store, hash-verified

502 * @returns 是否移除成功
503 */
504export function removeData(data: DataMap, path: string): boolean {
505 // 空路径:清空整个数据模型
506 if (path === '' || path === '/') {
507 const keys = Object.keys(data);
508 for (const key of keys) {
509 delete data[key];
510 }
511 return true;
512 }
513
514 return deleteData(data, path);
515}
516
517/**
518 * 获取路径的父路径

Calls 1

deleteDataFunction · 0.85

Tested by

no test coverage detected