findAssets(queryObj = {}) {
    const result = [];
    const compiledQuery = compileQuery(queryObj);
    for (const asset of this._assets) {
      if (compiledQuery(asset)) {
        result.push(asset);
      }
    }
    return result;
  }
Query assets in the graph.

Example usage:

    const allAssetsInGraph = ag.findAssets();

    const htmlAssets = ag.findAssets({type: 'Html'});

    const localImageAssets = ag.findAssets({
        url: { protocol: 'file:', extension: { $regex: /^(?:png|gif|jpg)$/ }
    });

    const orphanedJavaScriptAssets = ag.findAssets(function (asset) {
        return asset.type === 'JavaScript' &&
               ag.findRelations({to: asset}).length === 0;
    });

    const textBasedAssetsOnGoogleCom = ag.findAssets({
        isText: true,
        url: {$regex: /^https?:\/\/(?:www\.)google\.com\//}
    });

@param {Object} [queryObj={}] Query to match assets against. Will match all assets if not provided.
@return {Asset[]} The found assets.