mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-03 08:18:42 +00:00
Fixed docstring for trimTopLanguages function (#2833)
* Fixed docstring for trimTopLanguages function * dev
This commit is contained in:
@@ -163,11 +163,11 @@ const donutCenterTranslation = (totalLangs) => {
|
||||
* Trim top languages to lang_count while also hiding certain languages.
|
||||
*
|
||||
* @param {Record<string, Lang>} topLangs Top languages.
|
||||
* @param {string[]} hide Languages to hide.
|
||||
* @param {string} langs_count Number of languages to show.
|
||||
* @returns {{topLangs: Record<string, Lang>, totalSize: number}} Trimmed top languages and total size.
|
||||
* @param {string[]=} hide Languages to hide.
|
||||
* @returns {{ langs: Lang[], totalLanguageSize: number }} Trimmed top languages and total size.
|
||||
*/
|
||||
const trimTopLanguages = (topLangs, hide, langs_count) => {
|
||||
const trimTopLanguages = (topLangs, langs_count, hide) => {
|
||||
let langs = Object.values(topLangs);
|
||||
let langsToHide = {};
|
||||
let langsCount = clampValue(parseInt(langs_count), 1, 10);
|
||||
@@ -733,8 +733,8 @@ const renderTopLanguages = (topLangs, options = {}) => {
|
||||
|
||||
const { langs, totalLanguageSize } = trimTopLanguages(
|
||||
topLangs,
|
||||
hide,
|
||||
String(langs_count),
|
||||
hide,
|
||||
);
|
||||
|
||||
let width = isNaN(card_width)
|
||||
|
||||
Reference in New Issue
Block a user