Files
openclaw/src/plugin-sdk/string-coerce-runtime.ts
2026-05-28 17:37:52 -04:00

48 lines
1.4 KiB
TypeScript

// Narrow primitive coercion helpers for plugins that do not need the full text-runtime barrel.
export {
hasNonEmptyString,
localeLowercasePreservingWhitespace,
lowercasePreservingWhitespace,
normalizeFastMode,
normalizeLowercaseStringOrEmpty,
normalizeNullableString,
normalizeOptionalLowercaseString,
normalizeOptionalString,
normalizeOptionalStringifiedId,
normalizeStringifiedEntries,
normalizeStringifiedOptionalString,
readStringValue,
} from "../shared/string-coerce.js";
export {
asFiniteNumberInRange,
asFiniteNumber,
asPositiveSafeInteger,
asSafeIntegerInRange,
parseFiniteNumber,
} from "../shared/number-coercion.js";
export { asBoolean, parseBooleanValue } from "../utils/boolean.js";
export {
asRecord,
asNullableRecord,
asOptionalRecord,
readStringField,
} from "../shared/record-coerce.js";
export { isRecord } from "../utils.js";
export {
normalizeAtHashSlug,
normalizeHyphenSlug,
normalizeOptionalTrimmedStringList,
normalizeSortedUniqueTrimmedStringList,
normalizeSingleOrTrimmedStringList,
normalizeStringEntries,
normalizeStringEntriesLower,
normalizeUniqueStringEntries,
normalizeUniqueTrimmedStringList,
normalizeTrimmedStringList,
sortUniqueStrings,
uniqueStrings,
uniqueValues,
} from "../shared/string-normalization.js";
export { summarizeStringEntries } from "../shared/string-sample.js";