@@ -65,12 +65,12 @@ yarn add @flex-development/export-regex@flex-development/export-regex
6565
6666Suppose we have the following module:
6767
68- ``` typescript
68+ ``` ts
6969import * as regexp from ' @flex-development/export-regex'
70- import { omit } from ' radash '
70+ import { at , omit , select , type Times } from ' @flex-development/tutils '
7171import { dedent } from ' ts-dedent'
7272
73- const code: [ string , string , string , string ] = [
73+ const code: Times < 4 , string > = [
7474 dedent `
7575 export { defineBuildConfig, type BuildConfig } from "#src"
7676 export type {
@@ -126,13 +126,13 @@ const code: [string, string, string, string] = [
126126]
127127
128128const print = (matches : IterableIterator <RegExpMatchArray >): void => {
129- console .debug ([... matches ]. map ( match => omit (match , [' input' ])))
129+ console .debug (select ( [... matches ], null , match => omit (match , [' input' ])))
130130}
131131
132- print (code [ 0 ] .matchAll (regexp .EXPORT_AGGREGATE_REGEX ))
133- print (code [ 1 ] .matchAll (regexp .EXPORT_DECLARATION_REGEX ))
134- print (code [ 2 ] .matchAll (regexp .EXPORT_DEFAULT_REGEX ))
135- print (code [ 3 ] .matchAll (regexp .EXPORT_LIST_REGEX ))
132+ print (at ( code , 0 ) .matchAll (regexp .EXPORT_AGGREGATE_REGEX ))
133+ print (at ( code , 1 ) .matchAll (regexp .EXPORT_DECLARATION_REGEX ))
134+ print (at ( code , 2 ) .matchAll (regexp .EXPORT_DEFAULT_REGEX ))
135+ print (at ( code , 3 ) .matchAll (regexp .EXPORT_LIST_REGEX ))
136136```
137137
138138...running that yields:
0 commit comments