Skip to content

Instantly share code, notes, and snippets.

@Ivannnnn
Last active September 13, 2022 07:48
Show Gist options
  • Save Ivannnnn/bb747c1427a5983c627254c840eb6e16 to your computer and use it in GitHub Desktop.
Save Ivannnnn/bb747c1427a5983c627254c840eb6e16 to your computer and use it in GitHub Desktop.
function buildQueryStr(obj) {
const s = new URLSearchParams();
Object.keys(obj).forEach((key) => {
s.set(key, obj[key]);
});
return s.toString();
}
const randomBetween = (min, max) => {
return Math.round(Math.random() * (max - min)) + min;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment