UNPKG

149 BJavaScriptView Raw
1const isASCII = (x) => /^[\x00-\x7f]+$/.test(x);
2const isPrintableASCII = (x) => /^[\x20-\x7e]+$/.test(x);
3export {
4 isASCII,
5 isPrintableASCII
6};