var ldfetch = require('../lib/ldfetch.js');
var fetch = new ldfetch();

/**
 * This example script shows how you can discover all subjects mentioned on the hydra:previous page of a Linked Data resource
 */

//but works as well flawlessly with this:
var url1 = 'https://datapiloten.be/patriciastreets/fragment1.jsonld';

//Execute the request and do something with the response
var LC = async function () {  
  var objects = await fetch.get(url1).then(response => {
    console.error('Fetched: ' + response.url);
    return fetch.frame(response.triples, {"@graph": {}});
  });
  console.log(JSON.stringify(objects));
}

LC();
