lib/srt.js
function(file, options, callback) {
        fs.readFile(file, options, function(err, data) {
            if (err) {
                return callback(err);
            }
            module.exports.parse(data.toString(), function(parseErr, lines) {
                if (parseErr) {
                    return callback(parseErr);
                }
                callback(undefined, lines);
            });
        });
    }
function(file, options, callback) {
        fs.readFile(file, options, function(err, data) {
            if (err) {
                return callback(err);
            }
            module.exports.parse(data.toString(), function(parseErr, lines) {
                if (parseErr) {
                    return callback(parseErr);
                }
                callback(undefined, lines);
            });
        });
    }
function ( file , options , callback ) { fs . readFile ( file , options , function ( err , data ) { if ( err ) { return callback ( err ) ; } module . exports . parse ( data . toString ( ) , function ( parseErr , lines ) { if ( parseErr ) { return callback ( parseErr ) ; } callback ( undefined , lines ) ; } ) ; } ) ; }
Reads a SRT file and verifies it sees the proper header
@function
@param {string} file - path to file
@param {callback} callback - callback to call when complete
@public
Reads a SRT file and verifies it sees the proper header