index.js
function extractWords(str, store) {
    if (!str)
        return []

    if (Array.isArray(str))
        return str

    assert.equal(typeof str, 'string', 'first parameter must be an array or string')

    switch (store) {
        case undefined:
            if (cache)
                return parseWordListCached(str, cache)
            else
                return parseWordList(str)

        case null:
        case false:
            return parseWordList(str)

        default:
            assert.equal(typeof store, 'object', 'second parameter must be an object or null')
            return parseWordListCached(str, store)
    }
}
function extractWords(str, store) {
    if (!str)
        return []

    if (Array.isArray(str))
        return str

    assert.equal(typeof str, 'string', 'first parameter must be an array or string')

    switch (store) {
        case undefined:
            if (cache)
                return parseWordListCached(str, cache)
            else
                return parseWordList(str)

        case null:
        case false:
            return parseWordList(str)

        default:
            assert.equal(typeof store, 'object', 'second parameter must be an object or null')
            return parseWordListCached(str, store)
    }
}
function extractWords ( str , store ) { if ( ! str ) return [ ] if ( Array . isArray ( str ) ) return str assert . equal ( typeof str , 'string' , 'first parameter must be an array or string' ) switch ( store ) { case undefined : if ( cache ) return parseWordListCached ( str , cache ) else return parseWordList ( str ) case null : case false : return parseWordList ( str ) default : assert . equal ( typeof store , 'object' , 'second parameter must be an object or null' ) return parseWordListCached ( str , store ) } }
Extract words from a given string.

@param {string|Array} str The string to parse.
@param {null|Object} [store] Pass an object to use for caching instead of the default one. Or pass `null` to disable caching for this call.
@returns {[string]}
Extract words from a given string .