3
3
![ package version badge]
4
4
[ ![ size badge]] [ size url ]
5
5
[ ![ dependencies badge]] [ dependencies url ]
6
- ![ types badge]
7
6
8
- ➡️ ** This package wraps all available modules with snippets related to [ regexp ] **
7
+ ➡️ ** This package wraps all available modules with snippets related to [ RegExp ] **
9
8
— part of the [ terminal-nerds/snippets] project.
10
9
11
- [ terminal-nerds/snippets ] : https://github.com/terminal-nerds/snippets-regexp
10
+ [ regexp ] : https://developer.mozilla.org/en-US/docs/Glossary/RegExp
11
+ [ terminal-nerds/snippets ] : https://github.com/terminal-nerds/snippets
12
12
[ package version badge ] : https://img.shields.io/npm/v/@terminal-nerds/snippets-regexp/latest?style=for-the-badge&logo=npm
13
13
[ dependencies badge ] : https://img.shields.io/librariesio/release/npm/@terminal-nerds/snippets-regexp?style=for-the-badge
14
14
[ dependencies url ] : https://libraries.io/npm/@terminal-nerds%2snippets-regexp
15
15
[ size badge ] : https://img.shields.io/bundlephobia/minzip/@terminal-nerds/snippets-regexp?style=for-the-badge&label=size
16
16
[ size url ] : https://packagephobia.com/result?p=@terminal-nerds/snippets-regexp
17
- [ types badge ] : https://img.shields.io/npm/types/@terminal-nerds/snippets-regexp?style=for-the-badge&logo=typescript
18
17
19
18
## Modules included
20
19
33
32
34
33
---
35
34
36
- ## Prerequisites
35
+ ## Prerequisites & usage
36
+
37
+ ### Optional
38
+
39
+ [ ![ supported typescript version badge]] [ typescript ]
40
+ ![ types badge]
41
+
42
+ [ typescript ] : https://typescriptlang.org/
43
+ [ typescript icon ] : https://api.iconify.design/logos/typescript-icon.svg
44
+ [ supported typescript version badge ] : https://img.shields.io/github/package-json/dependency-version/terminal-nerds/snippets/peer/typescript?filename=packages%2Ftypescript%2Fpackage.json&logo=typescript&style=for-the-badge&label=typescript
45
+ [ types badge ] : https://img.shields.io/npm/types/@terminal-nerds/snippets-regexp?style=for-the-badge&logo=typescript
46
+
47
+ If you are using ![ typescript icon] [ TypeScript] ,
48
+ the latest version, which supports new features _ (such as ` satisfies ` )_ , is supported.
49
+
50
+ ### Runtime environments
51
+
52
+ This package can be used in several runtime environments.
53
+ We aim for cross-runtime compatibility and ensure proper error messages
54
+ if a particular snippet cannot be run in the currently running environment.
55
+
56
+ #### Browsers
57
+
58
+ We use [ browserslist] to define the minimum browsers versions supported.\
59
+ Take a look at our [ shared browserslist configuration] for more details.
60
+
61
+ [ browserslist ] : https://github.com/browserslist/browserslist
62
+ [ shared browserslist configuration ] : https://github.com/terminal-nerds/configs/blob/main/packages/browserslist/source/browsers.ts
63
+
64
+ ** Usage** :
65
+
66
+ ``` html
67
+ <script type =" module" >
68
+ import { snippet } from " https://cdn.jsdelivr.net/npm/@terminal-nerds/snippets-regexp" ;
69
+ </script >
70
+ ```
71
+
72
+ ---
73
+
74
+ #### Bun
75
+
76
+ We aim to support the latest version of ![ bun icon] [ bun] .
77
+
78
+ ** Usage** :
79
+
80
+ Firstly, install it:
81
+
82
+ ``` sh
83
+ bun add @terminal-nerds/snippets-regexp
84
+ ```
85
+
86
+ And then in a particular file:
87
+
88
+ ``` js
89
+ import { snippet } from " @terminal-nerds/snippets-regexp" ;
90
+ ```
91
+
92
+ [ bun ] : https://bun.sh/
93
+ [ bun icon ] : https://api.iconify.design/logos/bun.svg
94
+
95
+ ---
96
+
97
+ #### Deno
98
+
99
+ We aim to support the latest version of ![ deno icon] [ Deno] .
100
+
101
+ ** Usage** :
37
102
38
- > ** Note** ** The packages are written in ES Module _ (ESM)_ type.** \
39
- > If you wish to use in project with CommonJS _ (CJS)_ type, then, you need to bundle this package.
103
+ ``` ts
104
+ import { snippet } from " npm:@terminal-nerds/snippets-regexp" ;
105
+ ```
40
106
41
- ### Required
107
+ [ deno ] : https://deno.land/
108
+ [ deno icon ] : https://api.iconify.design/logos/deno.svg
109
+
110
+ ---
111
+
112
+ #### Node.js
42
113
43
114
[ ![ node.js version support badge]] [ node.js ]
44
115
45
- 1 . Latest ![ node.js icon] [ Node.js] LTS _ (Long-Term Support)_ version.
116
+ The latest ![ node.js icon] [ Node.js] LTS _ (Long-Term Support)_ version is the minimum one supported .
46
117
47
- [ node.js ] : https://nodejs.org/en/
48
- [ node.js icon ] : https://api.iconify.design/logos/nodejs-icon.svg
49
- [ node.js version support badge ] : https://img.shields.io/node/v-lts/@terminal-nerds/snippets?style=for-the-badge&logo=nodedotjs
118
+ > ** Warning ** \
119
+ > ** This package is written in [ ES Module ] _ (ESM) _ type. ** \
120
+ > So, if you wish to use it in a project with CommonJS (CJS) type, you need to bundle this package or a particular module(s).
50
121
51
- ### Optional
122
+ ** Usage ** :
52
123
53
- [ ![ supported typescript version badge ]] [ typescript ]
124
+ Install it first with the Node.js package manager of your choice. In our example, we use [ pnpm ] .
54
125
55
- [ typescript ] : https://typescriptlang.org/
56
- [ typescript icon ] : https://api.iconify.design/logos/typescript-icon.svg
57
- [ supported typescript version badge ] : https://img.shields.io/github/package-json/dependency-version/terminal-nerds/snippets/peer/typescript?filename=packages%2Ftypescript%2Fpackage.json&logo=typescript&style=for-the-badge&label=typescript
126
+ ``` sh
127
+ pnpm add @terminal-nerds/snippets-regexp
128
+ ```
129
+
130
+ And then in a particular file:
58
131
59
- 1 . If you are using ![ typescript icon] [ TypeScript] , then the latest version which supports new features _ (such as ` satisfies ` )_
60
- is recommended.
132
+ ``` js
133
+ import { snippet } from " @terminal-nerds/snippets-regexp" ;
134
+ ```
135
+
136
+ [ ES Module ] : https://www.freecodecamp.org/news/javascript-es-modules-and-module-bundlers
137
+ [ pnpm ] : https://pnpm.io
138
+ [ node.js ] : https://nodejs.org/en/
139
+ [ node.js icon ] : https://api.iconify.design/logos/nodejs-icon.svg
140
+ [ node.js version support badge ] : https://img.shields.io/node/v-lts/@terminal-nerds/snippets?style=for-the-badge&logo=nodedotjs
61
141
62
142
---
63
143
@@ -74,7 +154,17 @@ the [terminal-nerds/snippets] monorepo.
74
154
75
155
---
76
156
77
- ## Contributing
157
+ ## License
158
+
159
+ [ ![ license badge]] [ license ]
160
+
161
+ ⚖️ For more information, please refer to the [ License section] at the root of the [ terminal-nerds/snippets] monorepo.
162
+
163
+ [ license ] : https://github.com/terminal-nerds/snippets/blob/main/LICENSE.md
164
+ [ license badge ] : https://img.shields.io/github/license/terminal-nerds/snippets?style=for-the-badge
165
+ [ license section ] : https://github.com/terminal-nerds/snippets#License
166
+
167
+ ### Contributing
78
168
79
169
[ ![ contributors badge]] [ contributors url ]
80
170
@@ -87,14 +177,9 @@ if you wish to get involved.
87
177
[ contributors badge ] : https://img.shields.io/github/contributors/terminal-nerds/snippets?style=for-the-badge
88
178
[ contributors url ] : https://github.com/terminal-nerds/snippets#contributors
89
179
90
- ---
180
+ ### Author
91
181
92
- ## License
93
-
94
- [ ![ license badge]] [ license ]
95
-
96
- ⚖️ For more information, please refer to the [ License section] at the root of the [ terminal-nerds/snippets] monorepo.
182
+ 🎉 The idea of this project was initiated by [ xeho91] . However, it's the [ contributors] who matter the most.
97
183
98
- [ license ] : https://github.com/terminal-nerds/snippets/blob/main/LICENSE.md
99
- [ license badge ] : https://img.shields.io/github/license/terminal-nerds/snippets?style=for-the-badge
100
- [ license section ] : https://github.com/terminal-nerds/snippets#License
184
+ [ contributors ] : https://github.com/terminal-nerds/snippets/blob/main/README.md#project-contributors
185
+ [ xeho91 ] : https://github.com/xeho91
0 commit comments