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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more