UNPKG

gatsby-source-prismic

Version:

Gatsby source plugin for building websites using Prismic as a data source

14 lines (12 loc) 313 B
import { SerializedTypePath, TypePath } from "../types"; import { serializePath } from "./serializePath"; export const serializeTypePaths = ( typePaths: TypePath[], ): SerializedTypePath[] => { return typePaths.map((typePath) => { return { ...typePath, path: serializePath(typePath.path), }; }); };