export default ( len = 6 ) => { const chars = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678" ; const maxPos = chars . length ; let id = "" ; for ( let i = 0 ; i < len ; i ++ ) { id += chars . charAt ( Math . floor ( Math . random ( ) * maxPos ) ) ; } return id ; } ;