public/ckeditor/4.4dev/plugins/undo/plugin.js
function( keyCode ) {
			if ( typeof keyCode != 'number' ) {
				return this.stack.length - 1; // Last index or -1.
			} else {
				var i = this.stack.length;
				while ( i-- ) {
					if ( this.stack[ i ].keyCode == keyCode ) {
						return i;
					}
				}
				return -1;
			}
		}
function( keyCode ) {
			if ( typeof keyCode != 'number' ) {
				return this.stack.length - 1; // Last index or -1.
			} else {
				var i = this.stack.length;
				while ( i-- ) {
					if ( this.stack[ i ].keyCode == keyCode ) {
						return i;
					}
				}
				return -1;
			}
		}
function ( keyCode ) { if ( typeof keyCode != 'number' ) { return this . stack . length - 1 ; // Last index or -1.
 } else { var i = this . stack . length ; while ( i -- ) { if ( this . stack [ i ] . keyCode == keyCode ) { return i ; } } return - 1 ; } }
Returns the index of the last registered `keyCode` in the stack.
If no `keyCode` is provided, then the function will return the index of the last item.
If an item is not found, it will return `-1`.

@param {Number} [keyCode]
@returns {Number}
Returns the index of the last registered keyCode in the stack . If no keyCode is provided then the function will return the index of the last item . If an item is not found it will return - 1 .