Skip to content

Instantly share code, notes, and snippets.

@arschmitz
Created October 5, 2015 20:35
Show Gist options
  • Save arschmitz/7df6d2c9fafb4d86dbad to your computer and use it in GitHub Desktop.
Save arschmitz/7df6d2c9fafb4d86dbad to your computer and use it in GitHub Desktop.
function handleMatch( match ) {
// do things with match check if it does what i need
findText( string, match.position, ... ).search().then( handleMatch );
}
findText( string, offset, ... ).search().then( handleMatch );
findText( string ).search().then( function( match ) {
match.forEach( function( value ) {
// do stuff with each match
}
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment