UNPKG

zeptoid

Version:

A tiny isomorphic fast function for generating a cryptographically random hex string.

14 lines (13 loc) 214 B
/* HELPERS */ const re = /^[0-9a-f]{32}$/; /* MAIN */ const is = (str) => { if (str.length !== 32) { return false; } else { return re.test(str); } }; /* EXPORT */ export default is;