UNPKG

@prismicio/mock

Version:

Generate mock Prismic documents, fields, Slices, and models for development and testing environments

21 lines (20 loc) 681 B
import { capitalCase, sentenceCase } from "../lib/changeCase.js"; import { createFaker } from "../lib/createFaker.js"; import * as prismic from "@prismicio/client"; //#region src/model/contentRelationship.ts const contentRelationship = (config) => { const faker = config.faker || createFaker(config.seed); return { type: prismic.CustomTypeModelFieldType.Link, config: { label: capitalCase(faker.word()), placeholder: sentenceCase(faker.words(3)), select: prismic.CustomTypeModelLinkSelectType.Document, customtypes: config.customTypeIDs, tags: config.tags } }; }; //#endregion export { contentRelationship }; //# sourceMappingURL=contentRelationship.js.map