blockly > Procedures > isNameUsed
Procedures.isNameUsed() function
Return if the given name is already a procedure name.
Signature:
export declare function isNameUsed(name: string, workspace: Workspace, opt_exclude?: Block): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
name | string | The questionable name. |
workspace | Workspace | The workspace to scan for collisions. |
opt_exclude | Block | (Optional) Optional block to exclude from comparisons (one doesn't want to collide with oneself). |
Returns:
boolean
True if the name is used, otherwise return false.