UNPKG

frontitygit

Version:

A Frontity source package for the REST API of self-hosted and WordPress.com sites

16 lines (14 loc) 363 B
import { schema } from "normalizr"; import { normalize } from "../route-utils"; export const authorEntity = new schema.Entity( "authorEntity", {}, { processStrategy(entity) { const result = { ...entity }; result.link = normalize(result.link); return result; }, } ); export const authorEntities = new schema.Array(authorEntity);