MCPcopy Create free account
hub / github.com/agentrpc/agentrpc / validatePropertyName

Function validatePropertyName

sdk-node/src/util.ts:55–62  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

53};
54
55export const validatePropertyName = (name: string) => {
56 const ALLOWED_PROPERTY_NAME_CHARACTERS = /^[a-zA-Z0-9_]+$/;
57 if (!ALLOWED_PROPERTY_NAME_CHARACTERS.test(name)) {
58 throw new AgentRPCError(
59 `Property name must only contain letters, numbers and underscore '_'. Got: ${name}`,
60 );
61 }
62};
63
64export const validateDescription = (description?: string) => {
65 if (description === "") {

Callers 1

validatePropertyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected