9 lines
223 B
JavaScript
Raw Permalink Normal View History

2024-08-20 02:45:04 +03:00
/**
* Build a string describing the path.
*/
export default function printPathArray(path) {
return path.map(function (key) {
return typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key;
}).join('');
}