Public
Edited
Nov 16, 2022
Importers
Insert cell
Insert cell
chunkArr = (arr, chunkSize) => {
let chunks = [];
for (let i = 0; i < arr.length; i += chunkSize) {
chunks.push(arr.slice(i, i+chunkSize));
}
return chunks;
}
Insert cell
// From 2.9
padBlock = (arr, targetLen) => {
const diff = targetLen - (arr.length % targetLen);

const extraBytes = Array(diff).fill().map(() => diff);

return arr.concat(extraBytes);
}
Insert cell
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