const zeroWidthToBinary = ( zeroWidthStr ) => zeroWidthStr . split ( '﻿' ) . map ( char => { if ( char === '​' ) { return '1' ; } else if ( char === '‌' ) { return '0' ; } return ' ' ; } ) . join ( '' ) ; const binaryToText = ( binaryStr ) => binaryStr . split ( ' ' ) . map ( num => String . fromCharCode ( parseInt ( num , 2 ) ) ) . join ( '' ) ; export const zeroWidthToUsername = ( zeroWidthUsername ) => { const binaryUsername = zeroWidthToBinary ( zeroWidthUsername ) ; const textUsername = binaryToText ( binaryUsername ) ; return textUsername ; } ;