UNPKG

@prismicio/mock

Version:

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

20 lines (19 loc) 595 B
import { capitalCase, sentenceCase } from "../lib/changeCase.js"; import { createFaker } from "../lib/createFaker.js"; import * as prismic from "@prismicio/client"; //#region src/model/select.ts const select = (config) => { const faker = config.faker || createFaker(config.seed); return { type: prismic.CustomTypeModelFieldType.Select, config: { label: capitalCase(faker.word()), placeholder: sentenceCase(faker.words(3)), options: config.options || [], default_value: config.defaultValue || void 0 } }; }; //#endregion export { select }; //# sourceMappingURL=select.js.map