filer/perf/simple-statistics/api.js

21 lines
430 B
JavaScript
Raw Normal View History

2014-12-17 07:54:29 +00:00
var fs = require('fs');
var readme = fs.readFileSync('README.md', 'utf8')
.split('\n');
var a = true, b = true;
fs.writeFileSync('README.md', readme.filter(function(f) {
if (f === '---') {
a = !a;
return true;
}
return a;
}).map(function(f) {
if (f === '---' && b) {
f = f + '\n\n' + fs.readFileSync('API.md', 'utf8') + '\n\n';
b = false;
}
return f;
}).join('\n'));