index.js
function transform(file, enc, cb) {
        // ignore empty files
        if (file.isNull()) {
            cb(null, file);
            return;
        }

        if (file.isStream()) {
            throw new PluginError(PLUGIN_NAME, 'Streaming not supported. particular file: ' + file.path);
        }

        logger.debug('\n\nfile.path: %s', file.path || 'fake');

        if (skipFiles(file)) {
            logger.info('skip file %s', file.path);
            cb(null, file);
            return;
        }

        var pipe = this;
        processorEngine.process(file, cb, function onErr(msg) {
            pipe.emit('error', new PluginError(PLUGIN_NAME, msg));
        });
    }
function transform(file, enc, cb) {
        // ignore empty files
        if (file.isNull()) {
            cb(null, file);
            return;
        }

        if (file.isStream()) {
            throw new PluginError(PLUGIN_NAME, 'Streaming not supported. particular file: ' + file.path);
        }

        logger.debug('\n\nfile.path: %s', file.path || 'fake');

        if (skipFiles(file)) {
            logger.info('skip file %s', file.path);
            cb(null, file);
            return;
        }

        var pipe = this;
        processorEngine.process(file, cb, function onErr(msg) {
            pipe.emit('error', new PluginError(PLUGIN_NAME, msg));
        });
    }
function transform ( file , enc , cb ) { // ignore empty files if ( file . isNull ( ) ) { cb ( null , file ) ; return ; } if ( file . isStream ( ) ) { throw new PluginError ( PLUGIN_NAME , 'Streaming not supported. particular file: ' + file . path ) ; } logger . debug ( '\n\nfile.path: %s' , file . path || 'fake' ) ; if ( skipFiles ( file ) ) { logger . info ( 'skip file %s' , file . path ) ; cb ( null , file ) ; return ; } var pipe = this ; processorEngine . process ( file , cb , function onErr ( msg ) { pipe . emit ( 'error' , new PluginError ( PLUGIN_NAME , msg ) ) ; } ) ; }
This function is 'through' callback, so it has predefined arguments
@param {File} file file to analyse
@param {String} enc encoding (unused)
@param {Function} cb callback
This function is through callback so it has predefined arguments