getCode.js 170 Bytes Raw Blame History Permalink 1 2 3 4 5 6 var fs = require('fs') module.exports = function readCode(filePath) { if (!filePath.match(/\.js$/)) { filePath += '.js' } return fs.readFileSync(filePath).toString() }