Add rest of utils functions

pull/285/head
DominikDoom 2023-09-26 10:58:46 +02:00
parent 6cf9acd6ab
commit 74ea5493e5
1 changed files with 6 additions and 0 deletions

View File

@ -184,6 +184,12 @@ async function getUseCount(tagName) {
async function getUseCounts(tagNames) {
return (await fetchAPI(`tacapi/v1/get-use-count-list?tags=${tagNames.join("&tags=")}`))["result"];
}
async function getAllUseCounts() {
return (await fetchAPI(`tacapi/v1/get-all-use-counts`))["result"];
}
async function resetUseCount(tagName) {
putAPI(`tacapi/v1/reset-use-count/${tagName}`, null);
}
// Sliding window function to get possible combination groups of an array
function toNgrams(inputArray, size) {