A factory function for creating structured entry objects within a content management system. Use this to standardize data objects before saving them to the backend.
// Source: https://github.com/StaticJsCMS/static-cms | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
import isBoolean from 'lodash/isBoolean';
import type { MediaFile } from '../backend';
import type { WorkflowStatus } from '../constants/publishModes';
import type { Entry } from '../interface';
interface Options {
partial?: boolean;
raw?: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
data?: any;
label?: string | null;
isModification?: boolean | null;
mediaFiles?: MediaFile[] | null;
author?: string;
updatedOn?: string;
status?: WorkflowStatus;
meta?: { path: string };
i18n?: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[locale: string]: any;
};
openAuthoring?: boolean;
}
expo
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key