multi-account-post-schedule.../helpers/utils.js
2022-08-04 23:07:59 +02:00

8 lines
289 B
JavaScript

import Masto from "mastodon";
export function randomIntFromInterval(min, max) { // min and max included
return Math.floor(Math.random() * (max - min + 1) + min)
}
export function getRandomElementOfArray(listItems) {
return listItems[Math.floor(Math.random() * listItems.length)]
}