01JS↗
Random Data Generator
Generates random numbers within ranges or random strings
const random = {
// Generate random integer within range
int(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;#random#utility
easy2 useful things
Generates random numbers within ranges or random strings
const random = {
// Generate random integer within range
int(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;Convert a generator function into a context manager.
import functools
from contextlib import contextmanager
from typing import Callable, Generator