summaryrefslogtreecommitdiff
path: root/school/node_modules/graphql/jsutils/printPathArray.js
blob: 31224eb182df0dc368c6890982dff55f3ee29d7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = printPathArray;

/**
 * Build a string describing the path.
 */
function printPathArray(path) {
  return path.map(function (key) {
    return typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key;
  }).join('');
}