MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / findName

Function findName

cli/src/cli/node.ts:3–10  ·  view source on GitHub ↗
(nodes: NodeEntity[], uid: string)

Source from the content-addressed store, hash-verified

1import { NodeEntity } from '@protontech/drive-sdk';
2
3export function findName(nodes: NodeEntity[], uid: string): string {
4 for (const node of nodes) {
5 if (node.uid === uid) {
6 return getName(node);
7 }
8 }
9 return uid;
10}
11
12export function getName(node: NodeEntity): string {
13 const name = node.name.ok ? node.name.value : '';

Callers 5

copyNodesMethod · 0.90
moveNodesMethod · 0.90
actionMethod · 0.90
actionMethod · 0.90
actionMethod · 0.90

Calls 1

getNameFunction · 0.85

Tested by

no test coverage detected