@chassisjs/hermes
Version:
Production-Ready TypeScript Outbox Pattern
11 lines • 392 B
JavaScript
import { AssertionError } from '../errors.js';
import { assertSomething } from './utils.js';
const nonEmptyStringTest = 'must be a string';
assertSomething(nonEmptyStringTest);
export const parseNonEmptyString = (arg, error) => {
if (!arg) {
throw new AssertionError({}, error || `The value is an empty string`);
}
return arg;
};
//# sourceMappingURL=NonEmptyString.js.map