Module: microdata-imploder


(static) findAllReferenceHashes(microdata) → {Map.<string, Array.<ImploderSectionWithReference>>}

Name Type Description
microdata string

In a given string of microdata it finds all hashes in properties created by hash link recipe rules (links to objects, ID objects, CLOBs or BLOBs). It parses a ONE object microdata string and for each hash link yields the positions of the first and last character of the Reference object's microdata inside the string as well as the Javascript object representation of the Reference object.

The full tag to find - and to replace - is

<a itemprop="${propertyName}" data-type="${linkType}" href="${hash}">${hash}</a>

Returns a Map with "itemprop" strings as key and arrays of ImploderSectionWithReference objects as values - one for each Reference object it finds after applying the optional "properties" (inclusive) filter

Type: Map.<string, Array.<ImploderSectionWithReference>>

(async, static) implode(hash, idReferenceCallbackopt) → {Promise.<string>}

Name Type Attributes Description
hash SHA256Hash

SHA-256 hash of a ONE microdata object in storage

idReferenceCallback function <optional>

Reads a ONE microdata file identified by its crypto-hash and recursively replaces all references to other ONE objects by those objects themselves. The result is a single ONE object microdata string that contains the original object and all its references.

The imploded object is not written to storage! If the object is a versioned object It would become the latest version of the object before implosion (same Object-ID, so it would just add a new entry Object map). Imploded microdata is not meant to be stored but for whatever processing and external communication an app wants to perform.


Resolves with the imploded ONE object as a microdata string. It will be the same as the input object's microdata if no ONE objects are referenced in that object or if the options filtered out the existing references.

Type: Promise.<string>

Type Definitions


Type of the values returned by module microdata-imploder's findAllReferenceHashes function.

  • object
Name Type Description
start number
end number
hashLinkType HashLinkTypeNames
reference SHA256Hash | SHA256IdHash