laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
41 lines (40 loc) • 976 B
JavaScript
"use client";
const c = i(/[A-Za-z]/), r = i(/[\dA-Za-z]/), a = i(/[#-'*+\--9=?A-Z^-~]/);
function s(n) {
return (
// Special whitespace codes (which have negative values), C0 and Control
// character DEL
n !== null && (n < 32 || n === 127)
);
}
const e = i(/\d/), o = i(/[\dA-Fa-f]/), l = i(/[!-/:-@[-`{-~]/);
function f(n) {
return n !== null && n < -2;
}
function p(n) {
return n !== null && (n < 0 || n === 32);
}
function A(n) {
return n === -2 || n === -1 || n === 32;
}
const g = i(new RegExp("\\p{P}|\\p{S}", "u")), h = i(/\s/);
function i(n) {
return u;
function u(t) {
return t !== null && t > -1 && n.test(String.fromCharCode(t));
}
}
export {
c as asciiAlpha,
r as asciiAlphanumeric,
a as asciiAtext,
s as asciiControl,
e as asciiDigit,
o as asciiHexDigit,
l as asciiPunctuation,
f as markdownLineEnding,
p as markdownLineEndingOrSpace,
A as markdownSpace,
g as unicodePunctuation,
h as unicodeWhitespace
};