@joeygrable94/utm-src-pub-validators 0.0.84 → 0.0.86
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/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3259,6 +3259,14 @@ function datePlusDays(today, days = 30) {
|
|
|
3259
3259
|
date2.setHours(23, 59, 59, 999);
|
|
3260
3260
|
return date2;
|
|
3261
3261
|
}
|
|
3262
|
+
|
|
3263
|
+
// src/utilities/strapi-responses.ts
|
|
3264
|
+
function isStrapiAttributeError(result) {
|
|
3265
|
+
return result.error.details.errors.length > 0;
|
|
3266
|
+
}
|
|
3267
|
+
function isStrapiStandardError(result) {
|
|
3268
|
+
return "error" in result && "details" in result.error && typeof result.error.details === "object" && result.error.details !== null && "errors" in result.error.details && result.error.details.errors !== void 0;
|
|
3269
|
+
}
|
|
3262
3270
|
function validateAndClean(schema, input) {
|
|
3263
3271
|
var _a, _b;
|
|
3264
3272
|
try {
|
|
@@ -3818,6 +3826,8 @@ exports.WEBSITE_PAGINATION_DEFAULT_SIZE_LIMIT = WEBSITE_PAGINATION_DEFAULT_SIZE_
|
|
|
3818
3826
|
exports.WEBSITE_PAGINATION_MAX_SIZE_LIMIT = WEBSITE_PAGINATION_MAX_SIZE_LIMIT;
|
|
3819
3827
|
exports.datePlusDays = datePlusDays;
|
|
3820
3828
|
exports.dateToday = dateToday;
|
|
3829
|
+
exports.isStrapiAttributeError = isStrapiAttributeError;
|
|
3830
|
+
exports.isStrapiStandardError = isStrapiStandardError;
|
|
3821
3831
|
exports.isValidationFailure = isValidationFailure;
|
|
3822
3832
|
exports.isValidationSuccess = isValidationSuccess;
|
|
3823
3833
|
exports.omitUndefined = omitUndefined;
|