mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-22 21:53:08 +02: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…
Reference in a new issue