diff --git a/docs/schemata/index.md b/docs/schemata/index.md index c8a3da0a..1d9375cf 100644 --- a/docs/schemata/index.md +++ b/docs/schemata/index.md @@ -81,23 +81,23 @@ has_children: true ### String (17) -* Ascii ([docs](https://jacob-alford.github.io/schemata-ts/schemata/Ascii.html)) ([source](https://github.com/jacob-alford/schemata-ts/tree/main/src/schemata/Ascii.ts)) (e.g: `N>]G3"_eRiH`, `}LFB4`, `-NK (contents: string) => Build = // #endregion /** Extracts module name, e.g. ASCII.ts -> ASCII */ -const getModuleName: (file: string) => string = flow(Str.split('.'), RNEA.head) +const getModuleName: (file: string) => O.Option = flow( + Str.split('.'), + RNEA.head, + O.fromPredicate(Pred.not(Str.includes('index'))), +) const getSchemata: Build> = C => - pipe(C.readFiles('./src/schemata'), TE.map(RA.map(flow(getModuleName, tuple)))) + pipe( + C.readFiles('./src/schemata'), + TE.map(RA.filterMap(flow(getModuleName, O.map(tuple)))), + ) const format: Build = C => C.exec('yarn format') diff --git a/src/schemata/index.ts b/src/schemata/index.ts index 5e250a25..848fedef 100644 --- a/src/schemata/index.ts +++ b/src/schemata/index.ts @@ -35,7 +35,6 @@ export * from 'schemata-ts/schemata/Hexadecimal' export * from 'schemata-ts/schemata/HexColor' export * from 'schemata-ts/schemata/HslColor' export * from 'schemata-ts/schemata/Imap' -export * from 'schemata-ts/schemata/index' export * from 'schemata-ts/schemata/Int' export * from 'schemata-ts/schemata/Intersect' export * from 'schemata-ts/schemata/IntFromString'