MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / looksLikeFieldKey

Function looksLikeFieldKey

internal/cli/activity_changes.go:61–64  ·  view source on GitHub ↗
(field string)

Source from the content-addressed store, hash-verified

59const maxFieldKeyLength = 64
60
61func looksLikeFieldKey(field string) bool {
62 n := utf16Len(field)
63 return n > 0 && n <= maxFieldKeyLength && !strings.ContainsFunc(field, jsIsSpace)
64}
65
66// utf16Len is the length JavaScript reports for s.
67func utf16Len(s string) int {

Callers 1

FormatChangesForDisplayFunction · 0.70

Calls 1

utf16LenFunction · 0.85

Tested by

no test coverage detected