Global

Members

data

The original JSON data from the API
Source:

fragments

Fragments, converted to business objects
Source:

Methods

ApiCache()

Api cache
Source:

insertSpans(text, spans, linkResolver, htmlSerializer) → {string}

Parses a block that has spans, and inserts the proper HTML code.
Parameters:
Name Type Description
text string the original text of the block
spans object the spans as returned by the API
linkResolver object the function to build links that may be in the fragment (please read prismic.io's online documentation about this)
htmlSerializer function optional serializer
Source:
Returns:
- the HTML output
Type
string

LRUCache()

A doubly linked list-based Least Recently Used (LRU) cache. Will keep most recently used items while discarding least recently used items when its limit is reached. Licensed under MIT. Copyright (c) 2010 Rasmus Andersson See README.md for details. Illustration of the design: entry entry entry entry ______ ______ ______ ______ | head |.newer => | |.newer => | |.newer => | tail | | A | | B | | C | | D | |______| <= older.|______| <= older.|______| <= older.|______| removed <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- added
Source:

parseDoc() → {Document}

Parse json as a document
Source:
Returns:
Type
Document