You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

isInsecureRoomName.js 306B

12345678910111213
  1. // @flow
  2. import zxcvbn from 'zxcvbn';
  3. /**
  4. * Returns true if the room name is considered a weak (insecure) one.
  5. *
  6. * @param {string} roomName - The room name.
  7. * @returns {boolean}
  8. */
  9. export default function isInsecureRoomName(roomName: string = ''): boolean {
  10. return zxcvbn(roomName).score < 3;
  11. }