Public
Edited
Jan 6, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
todaysList(1, 2, 3, 4, 5, 6)
Insert cell
Insert cell
DateTime = (await import('luxon')).DateTime
Insert cell
today = todayRaw.toJSDate()
Insert cell
todayRaw = DateTime.utc().startOf('day')
Insert cell
Insert cell
import { shuffleSeeded } from "@jerryjappinen/math"
Insert cell
function todaysOrder (...args) {
const values = _.flatten(args)

// Shuffle indexes to random order
const indexes = _.range(0, values.length);
const shuffledIndexes = shuffleSeeded(indexes, today.getTime());

// Compose markdown
// return md`${shuffledIndexes.map((nameI, i) => {
// return `${i}. ${values[nameI]}\n`;
// })}`;

return shuffledIndexes.map(i => values[i])
}
Insert cell
function todaysList(...args) {
const list = todaysOrder(...args)
return md`${list.map((value, i) => {
return `${i}. ${value}\n`;
})}`;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more