@archoleat/reglib 1.8.0 → 1.9.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.
- package/README.md +15 -5
- package/index.d.ts +5 -0
- package/index.js +1 -1
- package/package.json +25 -25
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,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archoleat/reglib",
|
|
3
3
|
"description": "Library with ready-to-use regex",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.9.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
|
-
"email": "
|
|
7
|
+
"email": "nikkeyl.me@gmail.com",
|
|
8
8
|
"name": "Archoleat",
|
|
9
9
|
"url": "https://github.com/archoleat"
|
|
10
10
|
},
|
|
@@ -51,41 +51,41 @@
|
|
|
51
51
|
"@archoleat/eslint-flat-compatibility": "^1.2.1",
|
|
52
52
|
"@archoleat/prettier-define-config": "^1.1.0",
|
|
53
53
|
"@archoleat/semantic-release-define-config": "^1.2.0",
|
|
54
|
-
"@commitlint/cli": "^19.
|
|
55
|
-
"@commitlint/config-conventional": "^19.
|
|
56
|
-
"@commitlint/types": "^19.
|
|
54
|
+
"@commitlint/cli": "^19.8.1",
|
|
55
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
56
|
+
"@commitlint/types": "^19.8.1",
|
|
57
57
|
"@rollup/plugin-alias": "^5.1.1",
|
|
58
|
-
"@rollup/plugin-typescript": "^12.1.
|
|
58
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
59
59
|
"@semantic-release/changelog": "^6.0.3",
|
|
60
60
|
"@semantic-release/git": "^10.0.1",
|
|
61
|
-
"@types/bun": "^1.
|
|
62
|
-
"@types/node": "^22.10.5",
|
|
61
|
+
"@types/bun": "^1.2.20",
|
|
63
62
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
64
63
|
"@typescript-eslint/parser": "^7.18.0",
|
|
65
|
-
"conventional-changelog-conventionalcommits": "^
|
|
66
|
-
"editorconfig-checker": "^6.0
|
|
64
|
+
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
65
|
+
"editorconfig-checker": "^6.1.0",
|
|
67
66
|
"eslint": "^8.57.1",
|
|
68
67
|
"eslint-config-airbnb": "^19.0.4",
|
|
69
68
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
70
|
-
"eslint-config-prettier": "^
|
|
69
|
+
"eslint-config-prettier": "^10.1.8",
|
|
71
70
|
"eslint-define-config": "^2.1.0",
|
|
72
|
-
"eslint-import-resolver-typescript": "^
|
|
73
|
-
"eslint-plugin-import": "^2.
|
|
71
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
72
|
+
"eslint-plugin-import": "^2.32.0",
|
|
74
73
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
75
|
-
"eslint-plugin-unicorn": "^
|
|
76
|
-
"git-pull-run": "^1.
|
|
77
|
-
"globals": "^
|
|
74
|
+
"eslint-plugin-unicorn": "^60.0.0",
|
|
75
|
+
"git-pull-run": "^1.6.2",
|
|
76
|
+
"globals": "^16.3.0",
|
|
78
77
|
"husky": "^9.1.7",
|
|
79
|
-
"lint-staged": "^
|
|
80
|
-
"prettier": "^3.
|
|
78
|
+
"lint-staged": "^16.1.5",
|
|
79
|
+
"prettier": "^3.6.2",
|
|
81
80
|
"remark": "15.0.1",
|
|
82
81
|
"remark-cli": "^12.0.1",
|
|
83
|
-
"remark-preset-lint-consistent": "^6.0.
|
|
84
|
-
"remark-preset-lint-markdown-style-guide": "^6.0.
|
|
85
|
-
"remark-preset-lint-recommended": "^7.0.
|
|
86
|
-
"rollup": "^4.
|
|
87
|
-
"rollup-plugin-dts": "^6.
|
|
88
|
-
"rollup-plugin-esbuild": "^6.
|
|
89
|
-
"semantic-release": "^24.2.
|
|
82
|
+
"remark-preset-lint-consistent": "^6.0.1",
|
|
83
|
+
"remark-preset-lint-markdown-style-guide": "^6.0.1",
|
|
84
|
+
"remark-preset-lint-recommended": "^7.0.1",
|
|
85
|
+
"rollup": "^4.46.2",
|
|
86
|
+
"rollup-plugin-dts": "^6.2.1",
|
|
87
|
+
"rollup-plugin-esbuild": "^6.2.1",
|
|
88
|
+
"semantic-release": "^24.2.7",
|
|
89
|
+
"tslib": "^2.8.1"
|
|
90
90
|
}
|
|
91
91
|
}
|