Public
Edited
Apr 26, 2023
Insert cell
Insert cell
Insert cell
Insert cell
new SourceMapOverrides(pathMapping).apply(inputPath)
Insert cell
function forceForwardSlashes(str) {
return str.replace(/\\/g, '/')
}
Insert cell
function properJoin(...segments) {
return segments.join('/')
}
Insert cell
regexChars = '/\\.?*()^${}|[]+';
Insert cell
function escapeRegexSpecialChars(str, except) {
const useRegexChars = regexChars
.split('')
.filter(c => !except || except.indexOf(c) < 0)
.join('')
.replace(/[\\\]]/g, '\\$&');

const r = new RegExp(`[${useRegexChars}]`, 'g');
return str.replace(r, '\\$&');
}
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