• Converts a given string into an array of words

    Example

    words('I love javaScript!!'); // ["I", "love", "javaScript"]
    

    Example

    words('python, javaScript & coffee'); // ["python", "javaScript", "coffee"]
    

    Parameters

    • str: string
    • Optional pattern: RegExp = ...

    Returns string[]

Generated using TypeDoc