UNPKG

bguard

Version:

**bguard** is a powerful, flexible, and type-safe validation library for TypeScript. It allows developers to define validation schemas for their data structures and ensures that data conforms to the expected types and constraints.

20 lines (15 loc) 671 B
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _chunkTJQ5NVL4js = require('./chunk-TJQ5NVL4.js'); // src/asserts/string/endsWith.ts var endsWithErrorMessage = "The received value does not end with the required substring"; var endsWithErrorKey = "s:endsWith"; var endsWith = (substring) => (received, ctx) => { if (!received.endsWith(substring)) { ctx.addIssue(`ends with '${substring}'`, received, endsWithErrorKey); } }; endsWith.key = endsWithErrorKey; endsWith.message = endsWithErrorMessage; _chunkTJQ5NVL4js.setToDefaultLocale.call(void 0, endsWith); exports.endsWith = endsWith; //# sourceMappingURL=chunk-DCPRPCZ3.js.map