Following on T327317, which introduces a way to check if a global session user is a temporary, there is still a need to create a function in Javascript that checks if a given username is a temporary user.
AC
- Create a function that checks if a username given is a temporary username
- write tests for the fucntion.
Testing notes
- This can be tested on Beta, local, etc
- On a page where this code is loaded (e.g. Special:Block), this function can be tested in the browser developer tools console by calling: mw.util.isTemporaryUser( /* Some user name */ )
- It should return true for a temporary user name and false otherwise