mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	remove duplicate method
This commit is contained in:
		
							parent
							
								
									23f476dbf3
								
							
						
					
					
						commit
						6ecfe7c7c3
					
				
					 1 changed files with 0 additions and 11 deletions
				
			
		| 
						 | 
					@ -130,17 +130,6 @@ export class ImportNotesProcessorService {
 | 
				
			||||||
		return typeof obj[Symbol.iterator] === 'function';
 | 
							return typeof obj[Symbol.iterator] === 'function';
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private parseTwitterFile(str : string) : null | [{ tweet: any }] {
 | 
					 | 
				
			||||||
		const removed = str.replace(new RegExp('window\\.YTD\\.tweets\\.part0 = ', 'g'), '');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		try {
 | 
					 | 
				
			||||||
			return JSON.parse(removed);
 | 
					 | 
				
			||||||
		} catch (error) {
 | 
					 | 
				
			||||||
			//The format is not what we expected. Either this file was tampered with or twitters exports changed
 | 
					 | 
				
			||||||
			return null;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	@bindThis
 | 
						@bindThis
 | 
				
			||||||
	private parseTwitterFile(str : string) : { tweet: object }[] {
 | 
						private parseTwitterFile(str : string) : { tweet: object }[] {
 | 
				
			||||||
		const jsonStr = str.replace(/^\s*window\.YTD\.tweets\.part0\s*=\s*/, '');
 | 
							const jsonStr = str.replace(/^\s*window\.YTD\.tweets\.part0\s*=\s*/, '');
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue