Created
November 29, 2016 15:38
-
-
Save yoadsn/c9399ab6b3c2143eb324b99320c46020 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Prismic, { Document } from 'prismic.io'; | |
| ... | |
| let api = await Prismic.api("http://wescover-repo.prismic.io/api"); | |
| let document = await api.getByUID('homepage', 'homepage'); | |
| let asJson = JSON.stringify(document); | |
| let asObject = JSON.parse(asJson); | |
| let backToDoc = new Document( | |
| asObject.id, | |
| asObject.uid, | |
| asObject.type, | |
| asObject.href, | |
| asObject.tags, | |
| asObject.slugs, | |
| asObject.firstPublicationDate, | |
| asObject.lastPublicationDate, | |
| asObject.data); | |
| deepCopmpare(document, backToDoc) // true? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment