mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +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('');
|
|
}
|