UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

71 lines (70 loc) 2.25 kB
import { text } from "../chunk-AVHYDITZ.mjs"; import "../chunk-EBIF6AMC.mjs"; import "../chunk-KCY4RPFR.mjs"; import "../chunk-SSROJBD5.mjs"; import "../chunk-S3NSPQ7M.mjs"; import "../chunk-NNA77YYC.mjs"; import "../chunk-SJGQU3OG.mjs"; import "../chunk-D5IYAIMK.mjs"; import "../chunk-PF7HDF6B.mjs"; import "../chunk-IXK47WKF.mjs"; import "../chunk-PIRWVOO2.mjs"; import "../chunk-AAND4MKF.mjs"; import "../chunk-4N72FQFX.mjs"; // src/utils/Sentence.ts var Sentence = class { constructor(word, pre, sentence = (pre?.sentence ?? []).concat(word)) { this.sentence = sentence; } toString() { return text(this.sentence.join(" ")).sentence.toString(); } }; var Topic = class extends Sentence { it = new Sentence("it", this); anything = new Sentence("anything", this); id = (id) => new Sentence(`id '${id}'`, this); your = (subject) => new Sentence(`your ${subject ?? "item"}`, this); a = (subject) => new Sentence(subject ? `a ${subject}` : "an item", this); an = (subject) => new Sentence(`an ${subject ?? "item"}`, this); any = (subjects) => new Sentence(`any ${subjects ?? "items"}`, this); }; var Verb = class extends Sentence { add = new Topic("add", this); check = new Topic("check", this); fetch = new Topic("fetch", this); find = new Topic("find", this); like = new Topic("like", this); process = new Topic("process", this); remove = new Topic("remove", this); translate = new Topic("translate", this); update = new Topic("update", this); validate = new Topic("validate", this); }; var Not = class extends Verb { }; var SupportVerb = class extends Verb { not = new Not("not", this); }; var We = class extends Sentence { could = new SupportVerb("could", this); did = new SupportVerb("did", this); added = new Topic("added", this); checked = new Topic("checked", this); fetched = new Topic("fetched", this); found = new Topic("found", this); liked = new Topic("liked", this); processed = new Topic("processed", this); removed = new Topic("removed", this); translated = new Topic("translated", this); updated = new Topic("updated", this); validated = new Topic("validated", this); }; var we = new We("we"); export { Sentence, we }; //# sourceMappingURL=Sentence.mjs.map