github-pages-deploy-action/node_modules/graphql/jsutils/printPathArray.js.flow

15 lines
282 B
Plaintext
Raw Normal View History

2020-03-07 11:45:40 +08:00
// @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('');
}