UNPKG

als-statistics

Version:

Modular JS statistics toolkit for Node.js and the browser: descriptive stats, correlations (Pearson/Spearman/Kendall), t-tests & ANOVA (Student/Welch), reliability (Cronbach’s alpha), regression (linear/logistic), clustering (DBSCAN/HDBSCAN), and table/co

16 lines (13 loc) 541 B
import { writeFileSync, readFileSync, readdirSync } from 'fs' const items = readdirSync('./docs', { recursive: true }) let content = items.filter(item => item.endsWith('.md')) .sort() .map(filepath => readFileSync(`./docs/${filepath}`, 'utf-8')) .join('\n') const toRemove = ['title','description','keywords'] toRemove.forEach(k => { const r = new RegExp(`<${k}>[\\s\\S]*?<\/${k}>`,'gm') content = content.replace(r,'') }); content = content.replace(/(\n\s*){2,}$/gm,'') writeFileSync('./readme.md', content)