Files
freeCodeCamp/curriculum/test/utils/extract-script-js-comments.js
2021-03-20 11:59:13 +05:30

13 lines
293 B
JavaScript

var rehype = require('rehype');
var vfile = require('vfile');
var getComments = require('./plugins/get-script-js-comments');
const processor = rehype().use(getComments);
function extractComments(html) {
return processor.processSync(vfile(html)).data;
}
module.exports = extractComments;