packages/audio-pack/index.js
function encode (filename) {
  var ext = path.extname(filename)
  var data = fs.readFileSync(filename)
  var prefix = 'data:audio/' + ext.substring(1) + ';base64,'
  var encoded = new Buffer(data).toString('base64')
  return prefix + encoded
}
function encode (filename) {
  var ext = path.extname(filename)
  var data = fs.readFileSync(filename)
  var prefix = 'data:audio/' + ext.substring(1) + ';base64,'
  var encoded = new Buffer(data).toString('base64')
  return prefix + encoded
}
function encode ( filename ) { var ext = path . extname ( filename ) var data = fs . readFileSync ( filename ) var prefix = 'data:audio/' + ext . substring ( 1 ) + ';base64,' var encoded = new Buffer ( data ) . toString ( 'base64' ) return prefix + encoded }
Encode an audio file using base64
Encode an audio file using base64