mirror of https://github.com/tycrek/ass
parent
1210f7602a
commit
1e61482719
@ -1,11 +1,3 @@
|
||||
const { randomBytes } = require('crypto');
|
||||
const zeroWidthCap = '\u200B';
|
||||
const zeroWidthChars = [
|
||||
zeroWidthCap,
|
||||
'\u200C',
|
||||
'\u200D',
|
||||
'\u2060',
|
||||
'\u180E'
|
||||
];
|
||||
|
||||
module.exports = (size) => [...randomBytes(size)].map(byte => zeroWidthChars[+byte % zeroWidthChars.length]).join('').slice(1) + zeroWidthCap;
|
||||
const zeroWidthChars = ['\u200B', '\u200C', '\u200D', '\u2060', '\u180E'];
|
||||
module.exports = (size) => [...randomBytes(size)].map(byte => zeroWidthChars[+byte % zeroWidthChars.length]).join('').slice(1) + zeroWidthChars[0];
|
||||
|
Loading…
Reference in new issue