printPathArray.js 323 B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = printPathArray;
  6. /**
  7. * Build a string describing the path.
  8. */
  9. function printPathArray(path) {
  10. return path.map(function (key) {
  11. return typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key;
  12. }).join('');
  13. }