Created
October 31, 2017 21:12
-
-
Save mateuszsokola/45209ad01dea5d110ba32884fa73619f 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
/** | |
* @param {string} string | |
* @param {RegExp} pattern | |
*/ | |
export default function split(string:string, pattern: RegExp):Array<string> { | |
return string.match(pattern) || []; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment