mirror of
https://github.com/CamHenlin/MessagesForMacintosh.git
synced 2024-12-01 21:50:32 +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('');
|
||
|
}
|