UNPKG

graphql

Version:

A Query Language and Runtime which can target any service.

15 lines (13 loc) 282 B
// @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(''); }