printPathArray.mjs 223 Bytes
Newer Older
1 2 3 4 5 6 7 8
/**
 * Build a string describing the path.
 */
export default function printPathArray(path) {
  return path.map(function (key) {
    return typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key;
  }).join('');
}