npm install web3
var Web3 = require('web3')
var url = 'your RPC url here'
var web3 = new Web3(url)
web3.utils.sha3('Dapp-world') //we have used Dapp-world as username
console.log(web3.utils.sha3('Dapp-world')) //we have used Dapp-world as username
To generate keccak256 hash of an username you can try this code
console.log(web3.utils.keccak256('Dapp-world')) //we have used username as dapp-world
To generate SoliditySha3 hash of an username you can try this code
To generate randomHex hash of an username you can try this code
this takes byte size for the HEX string as an input e.g. 2 bytes HEX string will result 6 characters preficed with "0x"
For test ethers and link tokens. Click Here