UNPKG

@prismicio/mock

Version:

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

21 lines (20 loc) 651 B
import * as prismic from "@prismicio/client"; import { capitalCase, sentenceCase } from "../lib/changeCase.js"; import { createFaker } from "../lib/createFaker.js"; 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 } }; }; export { contentRelationship }; //# sourceMappingURL=contentRelationship.js.map