diff options
Diffstat (limited to 'includes/external/school/node_modules/graphql/jsutils/printPathArray.js.flow')
-rw-r--r-- | includes/external/school/node_modules/graphql/jsutils/printPathArray.js.flow | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/external/school/node_modules/graphql/jsutils/printPathArray.js.flow b/includes/external/school/node_modules/graphql/jsutils/printPathArray.js.flow new file mode 100644 index 0000000..552a415 --- /dev/null +++ b/includes/external/school/node_modules/graphql/jsutils/printPathArray.js.flow @@ -0,0 +1,13 @@ +// @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(''); +} |