@archoleat/reglib 1.7.0 → 1.9.0
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.
- package/README.md +15 -5
- package/index.d.ts +5 -0
- package/index.js +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
@@ -16,18 +16,28 @@
|
|
16
16
|
- [Contributing](#contributing)
|
17
17
|
- [License](#license)
|
18
18
|
|
19
|
+
This library provides a collection of useful
|
20
|
+
regular expressions for various use cases.
|
21
|
+
|
19
22
|
## Installation
|
20
23
|
|
21
24
|
```shell
|
22
25
|
bun i -D @archoleat/reglib
|
23
26
|
```
|
24
27
|
|
25
|
-
|
28
|
+
```shell
|
29
|
+
pnpm i -D @archoleat/reglib
|
30
|
+
```
|
26
31
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
32
|
+
```shell
|
33
|
+
npm i -D @archoleat/reglib
|
34
|
+
```
|
35
|
+
|
36
|
+
```shell
|
37
|
+
yarn add @archoleat/reglib --dev
|
38
|
+
```
|
39
|
+
|
40
|
+
## List of Regex
|
31
41
|
|
32
42
|
- ATTRIBUTE_REGEX
|
33
43
|
|
package/index.d.ts
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
declare const FONT_FILE_NAME_REGEX: RegExp;
|
2
2
|
|
3
|
+
declare const HYPHEN_REGEX: RegExp;
|
4
|
+
declare const HYPHENS_REGEX: RegExp;
|
5
|
+
|
3
6
|
declare const ATTRIBUTE_REGEX: string;
|
4
7
|
declare const CLASS_REGEX: string;
|
5
8
|
declare const BLOCK_REGEX = '[a-z][a-z0-9]*(-[a-z0-9]+)*';
|
@@ -31,6 +34,8 @@ export {
|
|
31
34
|
CLASS_SIBLING_REGEX,
|
32
35
|
ELEMENT_REGEX,
|
33
36
|
FONT_FILE_NAME_REGEX,
|
37
|
+
HYPHENS_REGEX,
|
38
|
+
HYPHEN_REGEX,
|
34
39
|
MODIFIER_REGEX,
|
35
40
|
NESTED_ATTRIBUTE_CHILD_REGEX,
|
36
41
|
NESTED_ATTRIBUTE_REGEX,
|
package/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
const G="(Italic)",s="(Variable)",o="[A-Z][a-z]",
|
1
|
+
const G="(Italic)",s="(Variable)",o="[A-Z][a-z]",c=`^${o}+(${o}+)?`,I=["Thin","Hairline","ExtraLight","UltraLight","Light","Regular","Medium","SemiBold","DemiBold","Bold","ExtraBold","UltraBold","Black","Heavy","ExtraBlack","UltraBlack"].join("|"),X=["otf","ttf","woff","woff2"].join("|"),L=`(${c})`,A=`(${I})`,N=`(${X})$`,a=[`${L}-${A}`,`(${G}?)(${s}?)`,`\\.${N}`].join(""),B=new RegExp(a),r=/-+/,i=/(^-|-$)/,_="[a-z0-9]",E="[^ ,{}]+",R=String.raw`\[[^\]]+\]`,t=String.raw`\.[a-z0-9_-]+`,S="--",T="__",$=String.raw`\s*\+\s*`,n=String.raw`\s*>\s*`,D=`[a-z]${_}*(-${_}+)*`,O=`(${T}${_}+(-${_}+)*)`,l=`(${S}${_}+(-${_}+)*)`,C=String.raw`(?:${E}\s*)?${$}${E}`,H=String.raw`(?:${E}\s*)?${n}${E}`,M=`${R}${$}${E}`,g=`${R}${n}${E}`,e=`${t}${$}${E}`,F=`${t}${n}${E}`,w=`&${R}${$}${E}`,U=`&${R}${n}${E}`,P=`&${t}${$}${E}`,Y=`&${t}${n}${E}`,d=`&${R}`,f=`&${t}`,x=`&${S}.+`,h=`&${T}.+`;export{g as ATTRIBUTE_CHILD_REGEX,R as ATTRIBUTE_REGEX,M as ATTRIBUTE_SIBLING_REGEX,D as BLOCK_REGEX,H as CHILD_REGEX,F as CLASS_CHILD_REGEX,t as CLASS_REGEX,e as CLASS_SIBLING_REGEX,O as ELEMENT_REGEX,B as FONT_FILE_NAME_REGEX,i as HYPHENS_REGEX,r as HYPHEN_REGEX,l as MODIFIER_REGEX,U as NESTED_ATTRIBUTE_CHILD_REGEX,d as NESTED_ATTRIBUTE_REGEX,w as NESTED_ATTRIBUTE_SIBLING_REGEX,Y as NESTED_CLASS_CHILD_REGEX,f as NESTED_CLASS_REGEX,P as NESTED_CLASS_SIBLING_REGEX,h as NESTED_ELEMENT_REGEX,x as NESTED_MODIFIER_REGEX,C as SIBLING_REGEX};
|
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.
|
4
|
+
"version": "1.9.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": {
|
7
7
|
"email": "archoleat@gmail.com",
|
@@ -59,7 +59,6 @@
|
|
59
59
|
"@semantic-release/changelog": "^6.0.3",
|
60
60
|
"@semantic-release/git": "^10.0.1",
|
61
61
|
"@types/bun": "^1.1.14",
|
62
|
-
"@types/node": "^22.10.5",
|
63
62
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
64
63
|
"@typescript-eslint/parser": "^7.18.0",
|
65
64
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|