src/providers/subscene.js
function extractSrt (buffer) {
  const zip = new AdmZip(buffer)
  const srtZipEntry = zip
    .getEntries()
    .find(zipEntry =>
      zipEntry.entryName.endsWith('.srt')
    )
  return zip.readAsText(srtZipEntry)
}
function extractSrt (buffer) {
  const zip = new AdmZip(buffer)
  const srtZipEntry = zip
    .getEntries()
    .find(zipEntry =>
      zipEntry.entryName.endsWith('.srt')
    )
  return zip.readAsText(srtZipEntry)
}
function extractSrt ( buffer ) { const zip = new AdmZip ( buffer ) const srtZipEntry = zip . getEntries ( ) . find ( zipEntry => zipEntry . entryName . endsWith ( '.srt' ) ) return zip . readAsText ( srtZipEntry ) }
Extract the first .srt file found in the given ZIP buffer.

@param {Buffer} buffer
@returns {string} the content of the first .srt file found in the given ZIP
Extract the first . srt file found in the given ZIP buffer .