multi-account-post-schedule.../helpers/utils.js

8 lines
289 B
JavaScript
Raw Normal View History

2022-08-04 23:07:59 +02:00
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)]
}