Skip to content

Commit

Permalink
refactor: remove unused methods/properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepinho committed Apr 23, 2017
1 parent 64cc245 commit 7231ce5
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/app/twitter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,4 @@ export class TwitterService {
});
});
}

private maxIntensity: number;

getTweets(): Tweet[] {
return tweets.map(({ id_str, text }) => ({ id_str, text }));
}

getTweetIntensity(tweet: Tweet): number {
return intensity(tweet.text) / this.getMaxIntensity();
}

private getMaxIntensity(): number {
if (typeof this.maxIntensity !== 'undefined') {
return this.maxIntensity;
}

return this.maxIntensity = Math.max.apply(Math, tweets.map(({ text }) => intensity(text)));
}
}

0 comments on commit 7231ce5

Please sign in to comment.