MCPcopy Create free account
hub / github.com/apache/fory / isReserved

Method isReserved

javascript/packages/core/lib/gen/builder.ts:454–456  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

452 }
453
454 static isReserved(key: string) {
455 return /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(key);
456 }
457
458 static isDotPropAccessor(prop: string) {
459 return /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(prop);

Callers 3

safeStringMethod · 0.80
safePropAccessorMethod · 0.80
safePropNameMethod · 0.80

Calls 1

testMethod · 0.65

Tested by

no test coverage detected