Created
February 24, 2019 19:44
-
-
Save uditalias/bd9d03195fe41e9443131b3b77471405 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return _.reduce(languagesBytes, (result: IRendererLanguage[], bytes: number, language: string) => { | |
const percent = bytes / this.totalBytes * 100 | |
result.push({ | |
language, | |
bytes, | |
percent: parseFloat(percent.toFixed(1)), | |
color: this.getLanguageColor(language) | |
}); | |
return result; | |
}, []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment