mirror of
https://github.com/CamHenlin/MessagesForMacintosh.git
synced 2024-11-29 08:49:40 +00:00
14 lines
283 B
Plaintext
14 lines
283 B
Plaintext
// @flow strict
|
|
/**
|
|
* Build a string describing the path.
|
|
*/
|
|
export default function printPathArray(
|
|
path: $ReadOnlyArray<string | number>,
|
|
): string {
|
|
return path
|
|
.map((key) =>
|
|
typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key,
|
|
)
|
|
.join('');
|
|
}
|