@archoleat/reglib 1.10.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +28 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -135,6 +135,15 @@ bun i -D @archoleat/reglib
135
135
  - Description: Matches a nested class selector.
136
136
  - Example: Matches `&.class`, `&.my-class`.
137
137
 
138
+ - EMAIL_REGEX
139
+
140
+ - Pattern: `^[^\s@]+@[^\s@]+\.[^\s@]+$`.
141
+
142
+ - Description: Matches email addresses with basic validation.
143
+
144
+ - Example: Matches `user@example.com`, `test.email@domain.co.uk`,
145
+ but not `invalid@`, `@domain.com`, or `user@domain`.
146
+
138
147
  - FONT_FILE_NAME_REGEX
139
148
 
140
149
  - Pattern: A complex regex for matching font file names.
@@ -145,6 +154,25 @@ bun i -D @archoleat/reglib
145
154
  - Example: Matches `Roboto-Bold.woff2`, `OpenSans-Italic-Variable.ttf`.
146
155
  > More info [validate-font-file-name](https://github.com/archoleat/validate-font-file-name)
147
156
 
157
+ - IS_MOBILE_REGEX
158
+
159
+ - Pattern: `Mobi|iP(hone|od|ad)|Android|BlackBerry`.
160
+
161
+ - Description: Detects mobile devices based on user agent strings.
162
+
163
+ - Example: Matches `iPhone`, `iPad`, `Android`, `BlackBerry`,
164
+ `Mobile Safari`, but not `Windows`, `Macintosh`.
165
+
166
+ - NAME_REGEX
167
+
168
+ - Pattern: `^(?!-)[A-Za-z\u00C0-\u017FА-Яа-яЁё\s\-\u3000\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FAF\u3400-\u4DBF]+(?<!-)$`.
169
+
170
+ - Description: Matches names with support for Latin, Cyrillic,
171
+ Japanese, and Chinese scripts. Cannot start or end with a hyphen.
172
+
173
+ - Example: Matches `John Doe`, `Jean-Paul`, `Иван Петров`,
174
+ `田中太郎`, but not `-John`, `Name-`, or `123`.
175
+
148
176
  ## Contributing
149
177
 
150
178
  Please read [**CONTRIBUTING**](https://github.com/archoleat/.github/blob/main/CONTRIBUTING.md)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@archoleat/reglib",
3
3
  "description": "Library with ready-to-use regex",
4
- "version": "1.10.0",
4
+ "version": "1.10.1",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "email": "nikkeyl.me@gmail.com",