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