@samoa-house-lib/shl-types 1.9.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/package.json +1 -1
- package/src/types.ts +4 -2
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -22,12 +22,14 @@ export type Condition = z.infer<typeof conditionSchema>
|
|
|
22
22
|
export type SearchParameter = z.infer<typeof searchParameterSchema>
|
|
23
23
|
|
|
24
24
|
export const shlIdSchema = z.string().min(3).brand("SamoaHouseLibraryID")
|
|
25
|
-
export const searchableTitleSchema = z.string()
|
|
25
|
+
export const searchableTitleSchema = z.string()
|
|
26
26
|
.transform((title) => {
|
|
27
27
|
title
|
|
28
|
+
.toLowerCase()
|
|
28
29
|
.replace("_", " ")
|
|
29
30
|
.replace(" & ", " and ")
|
|
30
|
-
.replace(/[^a-
|
|
31
|
+
.replace(/[^a-z0-9 ]/g, "") // Remove special characters
|
|
32
|
+
.trim()
|
|
31
33
|
})
|
|
32
34
|
|
|
33
35
|
export const nameSchema = z.string().transform((val) => {
|