MIDI.js/soundfont-generator/shell/inc/gen-base64.js

5 lines
168 B
JavaScript

var fs = require('fs');
var file = process.argv[2];
fs.readFile(file, 'binary', function(err, data) {
console.log(new Buffer(data, 'binary').toString('base64'));
});