tasks/jsonld/js/jsonld.js
function createDocumentLoader(promise) {
    return function(url, callback) {
      promise(url).then(
        // success
        function(remoteDocument) {
          callback(null, remoteDocument);
        },
        // failure
        callback
      );
    };
  }
function createDocumentLoader(promise) {
    return function(url, callback) {
      promise(url).then(
        // success
        function(remoteDocument) {
          callback(null, remoteDocument);
        },
        // failure
        callback
      );
    };
  }
function createDocumentLoader ( promise ) { return function ( url , callback ) { promise ( url ) . then ( // success function ( remoteDocument ) { callback ( null , remoteDocument ) ; } , // failure callback ) ; } ; }
converts a load document promise callback to a node-style callback
converts a load document promise callback to a node - style callback