jiti-meet/react/features/base/util/isInsecureRoomName.js

14 lines
306 B
JavaScript
Raw Normal View History

2020-05-18 12:07:09 +00:00
// @flow
import zxcvbn from 'zxcvbn';
/**
* Returns true if the room name is considered a weak (insecure) one.
*
* @param {string} roomName - The room name.
* @returns {boolean}
*/
export default function isInsecureRoomName(roomName: string = ''): boolean {
return zxcvbn(roomName).score < 3;
}