{"expireTime":9007200821600994000,"key":"gatsby-plugin-mdx-entire-payload-1d547e5baaadce425461b076e0c247c2-","val":{"mdast":{"type":"root","children":[{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"type:","position":{"start":{"line":2,"column":3,"offset":3},"end":{"line":2,"column":8,"offset":8},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":10,"offset":10},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":2,"column":10,"offset":10},"end":{"line":2,"column":11,"offset":11},"indent":[]}},{"type":"inlineCode","value":"(data: *, entities: Object = {}) => NormalizeState","position":{"start":{"line":2,"column":11,"offset":11},"end":{"line":2,"column":63,"offset":63},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":63,"offset":63},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"Use the schemas relationships to normalize for storage.","position":{"start":{"line":4,"column":1,"offset":65},"end":{"line":4,"column":56,"offset":120},"indent":[]}}],"position":{"start":{"line":4,"column":1,"offset":65},"end":{"line":4,"column":56,"offset":120},"indent":[]}},{"type":"code","lang":"js","meta":null,"value":"function Normalize() {\n    const person = new EntitySchema('person', {\n        shape: new ObjectSchema({})\n    });\n    const people = new ArraySchema(person);\n\n    const state = people.normalize([\n        {id: 'foo', name: 'fooschia'},\n        {id: 'bar', name: 'bartholomew'},\n        {id: 'foo', lastName: 'foofoo'},\n        {id: 'bar', lastName: 'barterer'},\n    ]);\n\n    return <JSON>{state}</JSON>;\n}","position":{"start":{"line":6,"column":1,"offset":122},"end":{"line":22,"column":4,"offset":537},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"list","ordered":false,"start":null,"spread":false,"children":[{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"You can provide existing entities this will perform a merge.","position":{"start":{"line":24,"column":3,"offset":541},"end":{"line":24,"column":63,"offset":601},"indent":[]}}],"position":{"start":{"line":24,"column":3,"offset":541},"end":{"line":24,"column":63,"offset":601},"indent":[]}}],"position":{"start":{"line":24,"column":1,"offset":539},"end":{"line":24,"column":63,"offset":601},"indent":[]}},{"type":"listItem","spread":false,"checked":null,"children":[{"type":"paragraph","children":[{"type":"text","value":"The input shape must match the shape of the definition schema.","position":{"start":{"line":25,"column":3,"offset":604},"end":{"line":25,"column":65,"offset":666},"indent":[]}}],"position":{"start":{"line":25,"column":3,"offset":604},"end":{"line":25,"column":65,"offset":666},"indent":[]}}],"position":{"start":{"line":25,"column":1,"offset":602},"end":{"line":25,"column":65,"offset":666},"indent":[]}}],"position":{"start":{"line":24,"column":1,"offset":539},"end":{"line":25,"column":65,"offset":666},"indent":[1]}},{"type":"export","value":"export const _frontmatter = {}","position":{"start":{"line":28,"column":1,"offset":669},"end":{"line":28,"column":31,"offset":699},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":28,"column":31,"offset":699}}},"scopeImports":[],"scopeIdentifiers":[],"rawMDXOutput":"/* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nexport const _frontmatter = {};\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n  console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\")\n  return <div {...props}/>\n};\n\nconst layoutProps = {\n  _frontmatter\n};\nconst MDXLayout = \"wrapper\"\nexport default function MDXContent({\n  components,\n  ...props\n}) {\n  return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n    <p><strong parentName=\"p\">{`type:`}</strong>{` `}<inlineCode parentName=\"p\">{`(data: *, entities: Object = {}) => NormalizeState`}</inlineCode></p>\n    <p>{`Use the schemas relationships to normalize for storage.`}</p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-js\"\n      }}>{`function Normalize() {\n    const person = new EntitySchema('person', {\n        shape: new ObjectSchema({})\n    });\n    const people = new ArraySchema(person);\n\n    const state = people.normalize([\n        {id: 'foo', name: 'fooschia'},\n        {id: 'bar', name: 'bartholomew'},\n        {id: 'foo', lastName: 'foofoo'},\n        {id: 'bar', lastName: 'barterer'},\n    ]);\n\n    return <JSON>{state}</JSON>;\n}\n`}</code></pre>\n    <ul>\n      <li parentName=\"ul\">{`You can provide existing entities this will perform a merge.`}</li>\n      <li parentName=\"ul\">{`The input shape must match the shape of the definition schema.`}</li>\n    </ul>\n\n    </MDXLayout>;\n}\n\n;\nMDXContent.isMDXComponent = true;"}}