freeCodeCamp/curriculum/test/utils/comment-to-data.js

10 lines
179 B
JavaScript

function commentToData(file, comment) {
if (file.data[comment]) {
file.data[comment]++;
} else {
file.data[comment] = 1;
}
}
exports.commentToData = commentToData;