@@ -123,6 +123,7 @@ const _resolvedContextCache = new LRU({max: RESOLVED_CONTEXT_CACHE_MAX_SIZE});
123123 * unmappable values (or to throw an error when they are detected);
124124 * if this function returns `undefined` then the default behavior
125125 * will be used.
126+ * [handleEvent] handler for events such as warnings.
126127 * [contextResolver] internal use only.
127128 *
128129 * @return a Promise that resolves to the compacted output.
@@ -271,6 +272,7 @@ jsonld.compact = async function(input, ctx, options) {
271272 * unmappable values (or to throw an error when they are detected);
272273 * if this function returns `undefined` then the default behavior
273274 * will be used.
275+ * [handleEvent] handler for events such as warnings.
274276 * [contextResolver] internal use only.
275277 *
276278 * @return a Promise that resolves to the expanded output.
@@ -368,6 +370,7 @@ jsonld.expand = async function(input, options) {
368370 * [base] the base IRI to use.
369371 * [expandContext] a context to expand with.
370372 * [documentLoader(url, options)] the document loader.
373+ * [handleEvent] handler for events such as warnings.
371374 * [contextResolver] internal use only.
372375 *
373376 * @return a Promise that resolves to the flattened output.
@@ -423,6 +426,7 @@ jsonld.flatten = async function(input, ctx, options) {
423426 * [requireAll] default @requireAll flag (default: true).
424427 * [omitDefault] default @omitDefault flag (default: false).
425428 * [documentLoader(url, options)] the document loader.
429+ * [handleEvent] handler for events such as warnings.
426430 * [contextResolver] internal use only.
427431 *
428432 * @return a Promise that resolves to the framed output.
@@ -505,6 +509,7 @@ jsonld.frame = async function(input, frame, options) {
505509 * [base] the base IRI to use.
506510 * [expandContext] a context to expand with.
507511 * [documentLoader(url, options)] the document loader.
512+ * [handleEvent] handler for events such as warnings.
508513 * [contextResolver] internal use only.
509514 *
510515 * @return a Promise that resolves to the linked output.
@@ -540,6 +545,7 @@ jsonld.link = async function(input, ctx, options) {
540545 * 'application/n-quads' for N-Quads.
541546 * [documentLoader(url, options)] the document loader.
542547 * [useNative] true to use a native canonize algorithm
548+ * [handleEvent] handler for events such as warnings.
543549 * [contextResolver] internal use only.
544550 *
545551 * @return a Promise that resolves to the normalized output.
@@ -594,6 +600,7 @@ jsonld.normalize = jsonld.canonize = async function(input, options) {
594600 * (default: false).
595601 * [useNativeTypes] true to convert XSD types into native types
596602 * (boolean, integer, double), false not to (default: false).
603+ * [handleEvent] handler for events such as warnings.
597604 *
598605 * @return a Promise that resolves to the JSON-LD document.
599606 */
@@ -643,6 +650,7 @@ jsonld.fromRDF = async function(dataset, options) {
643650 * [produceGeneralizedRdf] true to output generalized RDF, false
644651 * to produce only standard RDF (default: false).
645652 * [documentLoader(url, options)] the document loader.
653+ * [handleEvent] handler for events such as warnings.
646654 * [contextResolver] internal use only.
647655 *
648656 * @return a Promise that resolves to the RDF dataset.
@@ -696,6 +704,7 @@ jsonld.toRDF = async function(input, options) {
696704 * [expandContext] a context to expand with.
697705 * [issuer] a jsonld.IdentifierIssuer to use to label blank nodes.
698706 * [documentLoader(url, options)] the document loader.
707+ * [handleEvent] handler for events such as warnings.
699708 * [contextResolver] internal use only.
700709 *
701710 * @return a Promise that resolves to the merged node map.
@@ -735,6 +744,7 @@ jsonld.createNodeMap = async function(input, options) {
735744 * new properties where a node is in the `object` position
736745 * (default: true).
737746 * [documentLoader(url, options)] the document loader.
747+ * [handleEvent] handler for events such as warnings.
738748 * [contextResolver] internal use only.
739749 *
740750 * @return a Promise that resolves to the merged output.
@@ -897,6 +907,7 @@ jsonld.get = async function(url, options) {
897907 * @param localCtx the local context to process.
898908 * @param [options] the options to use:
899909 * [documentLoader(url, options)] the document loader.
910+ * [handleEvent] handler for events such as warnings.
900911 * [contextResolver] internal use only.
901912 *
902913 * @return a Promise that resolves to the new active context.
0 commit comments