Created
October 5, 2015 20:35
-
-
Save arschmitz/7df6d2c9fafb4d86dbad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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