require('chat-engine-online-user-search')(configopt)
Example
//providing a config is optional, the defaults are below
let config = { prop: 'uuid', caseSensitive: false }
chat.plugin(ChatEngineCore.plugin['chat-engine-online-user-search'](config));
let results = chat.onlineUserSearch.search('foo');
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
config |
Object |
<optional> |
The config object |
Methods
(inner) search(needle) → {Array}
- Augments:
- Source:
Parameters:
Name | Type | Description |
---|---|---|
needle |
String | The username to search for. |
Returns:
An array of Users that match the input string.
- Type
- Array