lost+found/src/pattern.js
function (item, state, char) {
                if (state.count < item.min() // Not enough match
                        // or at least two characters went through
                    || state.length > state.matchingLength + 1) {
                    // Terminal error
                    return PatternItem.WRITE_NO_MATCH;
                }
                item = this._getItem(state, state.index + 1);
                if (null === item) {
                    return PatternItem.WRITE_NO_MATCH;
                }
                ++state.index;
                this._reset(item, state);
                return this.write(state, char); // Try with this one
            }
function (item, state, char) {
                if (state.count < item.min() // Not enough match
                        // or at least two characters went through
                    || state.length > state.matchingLength + 1) {
                    // Terminal error
                    return PatternItem.WRITE_NO_MATCH;
                }
                item = this._getItem(state, state.index + 1);
                if (null === item) {
                    return PatternItem.WRITE_NO_MATCH;
                }
                ++state.index;
                this._reset(item, state);
                return this.write(state, char); // Try with this one
            }
function ( item , state , char ) { if ( state . count < item . min ( ) // Not enough match // or at least two characters went through || state . length > state . matchingLength + 1 ) { // Terminal error return PatternItem . WRITE_NO_MATCH ; } item = this . _getItem ( state , state . index + 1 ) ; if ( null === item ) { return PatternItem . WRITE_NO_MATCH ; } ++ state . index ; this . _reset ( item , state ) ; return this . write ( state , char ) ; // Try with this one }
Handles situation when current item does not match on char

@param {PatternItem} item
@param {Object} state
@param {String} char
@return {Number} write result
@private
Handles situation when current item does not match on char