MCPcopy Create free account
hub / github.com/denoland/std / joinKeys

Function joinKeys

toml/stringify.ts:6–16  ·  view source on GitHub ↗
(keys: string[])

Source from the content-addressed store, hash-verified

4// Bare keys may only contain ASCII letters,
5// ASCII digits, underscores, and dashes (A-Za-z0-9_-).
6function joinKeys(keys: string[]): string {
7 // Dotted keys are a sequence of bare or quoted keys joined with a dot.
8 // This allows for grouping similar properties together:
9 return keys
10 .map((str: string): string => {
11 return str.length === 0 || str.match(/[^A-Za-z0-9_-]/)
12 ? JSON.stringify(str)
13 : str;
14 })
15 .join(".");
16}
17
18type ArrayType =
19 | "ONLY_PRIMITIVE"

Callers 4

#printAsInlineValueMethod · 0.85
#headerMethod · 0.85
#headerGroupMethod · 0.85
#declarationMethod · 0.85

Calls 2

matchMethod · 0.80
stringifyMethod · 0.80

Tested by

no test coverage detected