UNPKG

better-auth

Version:

The most comprehensive authentication library for TypeScript.

17 lines (15 loc) 381 B
function withApplyDefault(value, field, action) { if (action === "update") { return value; } if (value === void 0 || value === null) { if (field.defaultValue !== void 0) { if (typeof field.defaultValue === "function") { return field.defaultValue(); } return field.defaultValue; } } return value; } export { withApplyDefault as w };