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

Method safePropAccessor

javascript/packages/core/lib/gen/builder.ts:473–478  ·  view source on GitHub ↗
(prop: string)

Source from the content-addressed store, hash-verified

471 }
472
473 static safePropAccessor(prop: string) {
474 if (!CodecBuilder.isDotPropAccessor(prop) || CodecBuilder.isReserved(prop)) {
475 return `["${CodecBuilder.replaceBackslashAndQuote(prop)}"]`;
476 }
477 return `.${prop}`;
478 }
479
480 static safePropName(prop: string) {
481 if (!CodecBuilder.isDotPropAccessor(prop) || CodecBuilder.isReserved(prop)) {

Callers 3

writeMethod · 0.80
writeVarInt32RunMethod · 0.80
readMethod · 0.80

Calls 3

isDotPropAccessorMethod · 0.80
isReservedMethod · 0.80

Tested by

no test coverage detected