pull/12/head
tycrek 4 years ago
parent 1210f7602a
commit 1e61482719
No known key found for this signature in database
GPG Key ID: 25D74F3943625263

@ -1,11 +1,3 @@
const { randomBytes } = require('crypto'); const { randomBytes } = require('crypto');
const zeroWidthCap = '\u200B'; const zeroWidthChars = ['\u200B', '\u200C', '\u200D', '\u2060', '\u180E'];
const zeroWidthChars = [ module.exports = (size) => [...randomBytes(size)].map(byte => zeroWidthChars[+byte % zeroWidthChars.length]).join('').slice(1) + zeroWidthChars[0];
zeroWidthCap,
'\u200C',
'\u200D',
'\u2060',
'\u180E'
];
module.exports = (size) => [...randomBytes(size)].map(byte => zeroWidthChars[+byte % zeroWidthChars.length]).join('').slice(1) + zeroWidthCap;

Loading…
Cancel
Save