Current section

Files

Jump to
common_graphql_client priv npm node_modules graphql jsutils printPathArray.js.flow
Raw

priv/npm/node_modules/graphql/jsutils/printPathArray.js.flow

// @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('');
}