lib/scc.js
function(file, options, callback) {
        var lines;
        fs.readFile(file, options, function(err, data) {
            if (err) {
                //err
                return callback(err);
            }
            if (/\r\n/.test(data.toString())) {
                lines = data.toString().split('\r\n');
            } else {
                lines = data.toString().split('\n');
            }
            if (module.exports.verify(lines[0])) {
                callback(undefined, lines);
            } else {
                callback("INVALID_SCC_FORMAT");
            }
        });
    }
function(file, options, callback) {
        var lines;
        fs.readFile(file, options, function(err, data) {
            if (err) {
                //err
                return callback(err);
            }
            if (/\r\n/.test(data.toString())) {
                lines = data.toString().split('\r\n');
            } else {
                lines = data.toString().split('\n');
            }
            if (module.exports.verify(lines[0])) {
                callback(undefined, lines);
            } else {
                callback("INVALID_SCC_FORMAT");
            }
        });
    }
function ( file , options , callback ) { var lines ; fs . readFile ( file , options , function ( err , data ) { if ( err ) { //err return callback ( err ) ; } if ( / \r\n / . test ( data . toString ( ) ) ) { lines = data . toString ( ) . split ( '\r\n' ) ; } else { lines = data . toString ( ) . split ( '\n' ) ; } if ( module . exports . verify ( lines [ 0 ] ) ) { callback ( undefined , lines ) ; } else { callback ( "INVALID_SCC_FORMAT" ) ; } } ) ; }
Reads a SCC file and verifies it sees the proper header
@function
@param {string} file - File to read
@param {callback} callback - WHen the read is successful callback.
@public
Reads a SCC file and verifies it sees the proper header