11 lines
		
	
	
		
			213 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			213 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /**
 | |
|  * Build a string describing the path.
 | |
|  */
 | |
| export function printPathArray(path) {
 | |
|   return path
 | |
|     .map((key) =>
 | |
|       typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key,
 | |
|     )
 | |
|     .join('');
 | |
| }
 |