Skip to content

Instantly share code, notes, and snippets.

@robertknight
Created June 7, 2017 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertknight/4ec0f2c3509af61c31ffd574fe16cb74 to your computer and use it in GitHub Desktop.
Save robertknight/4ec0f2c3509af61c31ffd574fe16cb74 to your computer and use it in GitHub Desktop.
Instrumented code with / without Babel
"use strict";
var __cov_SUV7p8hF8R_tajG59h5NCQ = (Function('return this'))();
if (!__cov_SUV7p8hF8R_tajG59h5NCQ.__coverage__) {
__cov_SUV7p8hF8R_tajG59h5NCQ.__coverage__ = {};
}
__cov_SUV7p8hF8R_tajG59h5NCQ = __cov_SUV7p8hF8R_tajG59h5NCQ.__coverage__;
if (!(__cov_SUV7p8hF8R_tajG59h5NCQ['/Users/robert/hypothesis/repos/client/src/sidebar/components/stream-content.js'])) {
__cov_SUV7p8hF8R_tajG59h5NCQ['/Users/robert/hypothesis/repos/client/src/sidebar/components/stream-content.js'] = {
"path": "/Users/robert/hypothesis/repos/client/src/sidebar/components/stream-content.js",
"s": {
"1": 1,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0,
"10": 0,
"11": 0,
"12": 0,
"13": 0,
"14": 0,
"15": 0,
"16": 0,
"17": 0,
"18": 0,
"19": 0,
"20": 0,
"21": 0,
"22": 0,
"23": 0,
"24": 0,
"25": 0,
"26": 0,
"27": 0,
"28": 0,
"29": 0,
"30": 0,
"31": 0,
"32": 0,
"33": 0,
"34": 0,
"35": 0,
"36": 0
},
"b": {
"1": [0, 0],
"2": [0, 0]
},
"f": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"fnMap": {
"1": {
"name": "StreamContentController",
"line": 5,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 7,
"column": 2
}
}
},
"2": {
"name": "(anonymous_2)",
"line": 14,
"loc": {
"start": {
"line": 16,
"column": 13
},
"end": {
"line": 16,
"column": 31
}
}
},
"3": {
"name": "(anonymous_3)",
"line": 22,
"loc": {
"start": {
"line": 24,
"column": 14
},
"end": {
"line": 24,
"column": 31
}
}
},
"4": {
"name": "(anonymous_4)",
"line": 29,
"loc": {
"start": {
"line": 33,
"column": 13
},
"end": {
"line": 33,
"column": 28
}
}
},
"5": {
"name": "(anonymous_5)",
"line": 36,
"loc": {
"start": {
"line": 40,
"column": 29
},
"end": {
"line": 40,
"column": 41
}
}
},
"6": {
"name": "(anonymous_6)",
"line": 55,
"loc": {
"start": {
"line": 61,
"column": 22
},
"end": {
"line": 61,
"column": 36
}
}
},
"7": {
"name": "(anonymous_7)",
"line": 64,
"loc": {
"start": {
"line": 70,
"column": 11
},
"end": {
"line": 70,
"column": 23
}
}
},
"8": {
"name": "(anonymous_8)",
"line": 67,
"loc": {
"start": {
"line": 73,
"column": 12
},
"end": {
"line": 73,
"column": 25
}
}
},
"9": {
"name": "(anonymous_9)",
"line": 72,
"loc": {
"start": {
"line": 78,
"column": 25
},
"end": {
"line": 78,
"column": 37
}
}
}
},
"statementMap": {
"1": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 87,
"column": 1
}
},
"2": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 2
}
},
"3": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 2
}
},
"4": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 2
}
},
"5": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 2
}
},
"6": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 4
}
},
"7": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 4
}
},
"8": {
"start": {
"line": 24,
"column": 2
},
"end": {
"line": 24,
"column": 2
}
},
"9": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 4
}
},
"10": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 31,
"column": 4
}
},
"11": {
"start": {
"line": 34,
"column": 8
},
"end": {
"line": 34,
"column": 8
}
},
"12": {
"start": {
"line": 39,
"column": 2
},
"end": {
"line": 39,
"column": 2
}
},
"13": {
"start": {
"line": 40,
"column": 2
},
"end": {
"line": 40,
"column": 2
}
},
"14": {
"start": {
"line": 41,
"column": 4
},
"end": {
"line": 44,
"column": 5
}
},
"15": {
"start": {
"line": 42,
"column": 6
},
"end": {
"line": 42,
"column": 6
}
},
"16": {
"start": {
"line": 43,
"column": 6
},
"end": {
"line": 43,
"column": 6
}
},
"17": {
"start": {
"line": 48,
"column": 2
},
"end": {
"line": 48,
"column": 2
}
},
"18": {
"start": {
"line": 52,
"column": 2
},
"end": {
"line": 52,
"column": 2
}
},
"19": {
"start": {
"line": 53,
"column": 2
},
"end": {
"line": 53,
"column": 2
}
},
"20": {
"start": {
"line": 54,
"column": 2
},
"end": {
"line": 54,
"column": 2
}
},
"21": {
"start": {
"line": 55,
"column": 2
},
"end": {
"line": 55,
"column": 2
}
},
"22": {
"start": {
"line": 58,
"column": 2
},
"end": {
"line": 58,
"column": 2
}
},
"23": {
"start": {
"line": 60,
"column": 2
},
"end": {
"line": 60,
"column": 2
}
},
"24": {
"start": {
"line": 61,
"column": 2
},
"end": {
"line": 61,
"column": 2
}
},
"25": {
"start": {
"line": 62,
"column": 4
},
"end": {
"line": 62,
"column": 4
}
},
"26": {
"start": {
"line": 64,
"column": 4
},
"end": {
"line": 64,
"column": 4
}
},
"27": {
"start": {
"line": 66,
"column": 4
},
"end": {
"line": 66,
"column": 4
}
},
"28": {
"start": {
"line": 69,
"column": 2
},
"end": {
"line": 69,
"column": 2
}
},
"29": {
"start": {
"line": 71,
"column": 6
},
"end": {
"line": 71,
"column": 6
}
},
"30": {
"start": {
"line": 74,
"column": 6
},
"end": {
"line": 74,
"column": 6
}
},
"31": {
"start": {
"line": 78,
"column": 2
},
"end": {
"line": 78,
"column": 2
}
},
"32": {
"start": {
"line": 79,
"column": 4
},
"end": {
"line": 79,
"column": 4
}
},
"33": {
"start": {
"line": 83,
"column": 2
},
"end": {
"line": 83,
"column": 2
}
},
"34": {
"start": {
"line": 85,
"column": 2
},
"end": {
"line": 85,
"column": 2
}
},
"35": {
"start": {
"line": 86,
"column": 2
},
"end": {
"line": 86,
"column": 2
}
},
"36": {
"start": {
"line": 89,
"column": 0
},
"end": {
"line": 89,
"column": 0
}
}
},
"branchMap": {
"1": {
"line": 37,
"type": "if",
"locations": [{
"start": {
"line": 41,
"column": 4
},
"end": {
"line": 41,
"column": 4
}
}, {
"start": {
"line": 41,
"column": 4
},
"end": {
"line": 41,
"column": 4
}
}]
},
"2": {
"line": 65,
"type": "binary-expr",
"locations": [{
"start": {
"line": 71,
"column": 13
},
"end": {
"line": 71,
"column": 13
}
}, {
"start": {
"line": 71,
"column": 31
},
"end": {
"line": 71,
"column": 6
}
}]
}
}
};
}
__cov_SUV7p8hF8R_tajG59h5NCQ = __cov_SUV7p8hF8R_tajG59h5NCQ['/Users/robert/hypothesis/repos/client/src/sidebar/components/stream-content.js'];
function StreamContentController($scope, $location, $route, $routeParams, annotationMapper, annotationUI, queryParser, rootThread, searchFilter, store, streamFilter, streamer) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['1']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['2']++;
var self = this;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['3']++;
annotationUI.setAppIsSidebar(false);
__cov_SUV7p8hF8R_tajG59h5NCQ.s['4']++;
var offset = 0;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['5']++;
var load = function(result) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['2']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['6']++;
offset += result.rows.length;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['7']++;
annotationMapper.loadAnnotations(result.rows, result.replies);
};
__cov_SUV7p8hF8R_tajG59h5NCQ.s['8']++;
var fetch = function(limit) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['3']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['9']++;
var query = Object.assign({
_separate_replies: true,
offset: offset,
limit: limit
}, searchFilter.toObject($routeParams.q));
__cov_SUV7p8hF8R_tajG59h5NCQ.s['10']++;
store.search(query).then(load).catch(function(err) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['4']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['11']++;
console.error(err);
});
};
__cov_SUV7p8hF8R_tajG59h5NCQ.s['12']++;
var lastQuery = $routeParams.q;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['13']++;
$scope.$on('$routeUpdate', function() {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['5']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['14']++;
if ($routeParams.q !== lastQuery) {
__cov_SUV7p8hF8R_tajG59h5NCQ.b['1'][0]++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['15']++;
annotationUI.clearAnnotations();
__cov_SUV7p8hF8R_tajG59h5NCQ.s['16']++;
$route.reload();
} else {
__cov_SUV7p8hF8R_tajG59h5NCQ.b['1'][1]++;
}
});
__cov_SUV7p8hF8R_tajG59h5NCQ.s['17']++;
streamFilter.resetFilter().setMatchPolicyIncludeAll();
__cov_SUV7p8hF8R_tajG59h5NCQ.s['18']++;
var terms = searchFilter.generateFacetedFilter($routeParams.q);
__cov_SUV7p8hF8R_tajG59h5NCQ.s['19']++;
queryParser.populateFilter(streamFilter, terms);
__cov_SUV7p8hF8R_tajG59h5NCQ.s['20']++;
streamer.setConfig('filter', {
filter: streamFilter.getFilter()
});
__cov_SUV7p8hF8R_tajG59h5NCQ.s['21']++;
streamer.connect();
__cov_SUV7p8hF8R_tajG59h5NCQ.s['22']++;
fetch(20);
__cov_SUV7p8hF8R_tajG59h5NCQ.s['23']++;
this.setCollapsed = annotationUI.setCollapsed;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['24']++;
this.forceVisible = function(id) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['6']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['25']++;
var a = 1;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['26']++;
annotationUI.setForceVisible(id, true);
__cov_SUV7p8hF8R_tajG59h5NCQ.s['27']++;
return a;
}
;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['28']++;
Object.assign(this.search, {
query: function() {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['7']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['29']++;
return (__cov_SUV7p8hF8R_tajG59h5NCQ.b['2'][0]++,
$routeParams.q) || (__cov_SUV7p8hF8R_tajG59h5NCQ.b['2'][1]++,
'');
},
update: function(q) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['8']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['30']++;
$location.search({
q: q
});
}
});
__cov_SUV7p8hF8R_tajG59h5NCQ.s['31']++;
annotationUI.subscribe(function() {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['9']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['32']++;
self.rootThread = rootThread.thread(annotationUI.getState());
});
__cov_SUV7p8hF8R_tajG59h5NCQ.s['33']++;
annotationUI.setSortKey('Newest');
__cov_SUV7p8hF8R_tajG59h5NCQ.s['34']++;
this.loadMore = fetch;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['35']++;
debugger ;
}
__cov_SUV7p8hF8R_tajG59h5NCQ.s['36']++;
module.exports = {
controller: StreamContentController,
controllerAs: 'vm',
bindings: {
search: '<'
},
template: require('../templates/stream-content.html')
};
"use strict";
var __cov_SUV7p8hF8R_tajG59h5NCQ = (Function('return this'))();
if (!__cov_SUV7p8hF8R_tajG59h5NCQ.__coverage__) {
__cov_SUV7p8hF8R_tajG59h5NCQ.__coverage__ = {};
}
__cov_SUV7p8hF8R_tajG59h5NCQ = __cov_SUV7p8hF8R_tajG59h5NCQ.__coverage__;
if (!(__cov_SUV7p8hF8R_tajG59h5NCQ['/Users/robert/hypothesis/repos/client/src/sidebar/components/stream-content.js'])) {
__cov_SUV7p8hF8R_tajG59h5NCQ['/Users/robert/hypothesis/repos/client/src/sidebar/components/stream-content.js'] = {
"path": "/Users/robert/hypothesis/repos/client/src/sidebar/components/stream-content.js",
"s": {
"1": 1,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0,
"10": 0,
"11": 0,
"12": 0,
"13": 0,
"14": 0,
"15": 0,
"16": 0,
"17": 0,
"18": 0,
"19": 0,
"20": 0,
"21": 0,
"22": 0,
"23": 0,
"24": 0,
"25": 0,
"26": 0,
"27": 0,
"28": 0,
"29": 0,
"30": 0,
"31": 0,
"32": 0,
"33": 0,
"34": 0,
"35": 0
},
"b": {
"1": [0, 0],
"2": [0, 0]
},
"f": {
"1": 0,
"2": 0,
"3": 0,
"4": 0,
"5": 0,
"6": 0,
"7": 0,
"8": 0,
"9": 0
},
"fnMap": {
"1": {
"name": "StreamContentController",
"line": 5,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 7,
"column": 2
}
}
},
"2": {
"name": "load",
"line": 14,
"loc": {
"start": {
"line": 16,
"column": 13
},
"end": {
"line": 16,
"column": 31
}
}
},
"3": {
"name": "fetch",
"line": 22,
"loc": {
"start": {
"line": 24,
"column": 14
},
"end": {
"line": 24,
"column": 31
}
}
},
"4": {
"name": "(anonymous_4)",
"line": 29,
"loc": {
"start": {
"line": 33,
"column": 13
},
"end": {
"line": 33,
"column": 28
}
}
},
"5": {
"name": "(anonymous_5)",
"line": 36,
"loc": {
"start": {
"line": 40,
"column": 29
},
"end": {
"line": 40,
"column": 41
}
}
},
"6": {
"name": "(anonymous_6)",
"line": 55,
"loc": {
"start": {
"line": 61,
"column": 22
},
"end": {
"line": 61,
"column": 36
}
}
},
"7": {
"name": "query",
"line": 64,
"loc": {
"start": {
"line": 70,
"column": 11
},
"end": {
"line": 70,
"column": 23
}
}
},
"8": {
"name": "update",
"line": 67,
"loc": {
"start": {
"line": 73,
"column": 12
},
"end": {
"line": 73,
"column": 25
}
}
},
"9": {
"name": "(anonymous_9)",
"line": 72,
"loc": {
"start": {
"line": 78,
"column": 25
},
"end": {
"line": 78,
"column": 37
}
}
}
},
"statementMap": {
"1": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"2": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"3": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"4": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"5": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"6": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"7": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"8": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"9": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"10": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"11": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"12": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"13": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"14": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"15": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"16": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"17": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"18": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"19": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"20": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"21": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"22": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"23": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"24": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"25": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"26": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"27": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"28": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"29": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"30": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"31": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"32": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"33": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"34": {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
},
"35": {
"start": {
"line": 88,
"column": 0
},
"end": {
"line": 88,
"column": 17
}
}
},
"branchMap": {
"1": {
"line": 37,
"type": "if",
"locations": [{
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
}, {
"start": {
"line": 0,
"column": 0
},
"end": {
"line": 0,
"column": 0
},
"skip": true
}]
},
"2": {
"line": 65,
"type": "binary-expr",
"locations": [{
"start": {
"line": 71,
"column": 13
},
"end": {
"line": 71,
"column": 13
}
}, {
"start": {
"line": 71,
"column": 6
},
"end": {
"line": 71,
"column": 6
}
}]
}
}
};
}
__cov_SUV7p8hF8R_tajG59h5NCQ = __cov_SUV7p8hF8R_tajG59h5NCQ['/Users/robert/hypothesis/repos/client/src/sidebar/components/stream-content.js'];
function StreamContentController($scope, $location, $route, $routeParams, annotationMapper, annotationUI, queryParser, rootThread, searchFilter, store, streamFilter, streamer) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['1']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['2']++;
var self = this;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['3']++;
annotationUI.setAppIsSidebar(false);
__cov_SUV7p8hF8R_tajG59h5NCQ.s['4']++;
var offset = 0;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['5']++;
var load = function load(result) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['2']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['6']++;
offset += result.rows.length;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['7']++;
annotationMapper.loadAnnotations(result.rows, result.replies);
};
__cov_SUV7p8hF8R_tajG59h5NCQ.s['8']++;
var fetch = function fetch(limit) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['3']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['9']++;
var query = Object.assign({
_separate_replies: true,
offset: offset,
limit: limit
}, searchFilter.toObject($routeParams.q));
__cov_SUV7p8hF8R_tajG59h5NCQ.s['10']++;
store.search(query).then(load).catch(function(err) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['4']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['11']++;
console.error(err);
});
};
__cov_SUV7p8hF8R_tajG59h5NCQ.s['12']++;
var lastQuery = $routeParams.q;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['13']++;
$scope.$on('$routeUpdate', function() {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['5']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['14']++;
if ($routeParams.q !== lastQuery) {
__cov_SUV7p8hF8R_tajG59h5NCQ.b['1'][0]++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['15']++;
annotationUI.clearAnnotations();
__cov_SUV7p8hF8R_tajG59h5NCQ.s['16']++;
$route.reload();
} else {
__cov_SUV7p8hF8R_tajG59h5NCQ.b['1'][1]++;
}
});
__cov_SUV7p8hF8R_tajG59h5NCQ.s['17']++;
streamFilter.resetFilter().setMatchPolicyIncludeAll();
__cov_SUV7p8hF8R_tajG59h5NCQ.s['18']++;
var terms = searchFilter.generateFacetedFilter($routeParams.q);
__cov_SUV7p8hF8R_tajG59h5NCQ.s['19']++;
queryParser.populateFilter(streamFilter, terms);
__cov_SUV7p8hF8R_tajG59h5NCQ.s['20']++;
streamer.setConfig('filter', {
filter: streamFilter.getFilter()
});
__cov_SUV7p8hF8R_tajG59h5NCQ.s['21']++;
streamer.connect();
__cov_SUV7p8hF8R_tajG59h5NCQ.s['22']++;
fetch(20);
__cov_SUV7p8hF8R_tajG59h5NCQ.s['23']++;
this.setCollapsed = annotationUI.setCollapsed;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['24']++;
this.forceVisible = function(id) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['6']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['25']++;
var a = 1;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['26']++;
annotationUI.setForceVisible(id, true);
__cov_SUV7p8hF8R_tajG59h5NCQ.s['27']++;
return a;
}
;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['28']++;
Object.assign(this.search, {
query: function query() {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['7']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['29']++;
return (__cov_SUV7p8hF8R_tajG59h5NCQ.b['2'][0]++,
$routeParams.q) || (__cov_SUV7p8hF8R_tajG59h5NCQ.b['2'][1]++,
'');
},
update: function update(q) {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['8']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['30']++;
$location.search({
q: q
});
}
});
__cov_SUV7p8hF8R_tajG59h5NCQ.s['31']++;
annotationUI.subscribe(function() {
__cov_SUV7p8hF8R_tajG59h5NCQ.f['9']++;
__cov_SUV7p8hF8R_tajG59h5NCQ.s['32']++;
self.rootThread = rootThread.thread(annotationUI.getState());
});
__cov_SUV7p8hF8R_tajG59h5NCQ.s['33']++;
annotationUI.setSortKey('Newest');
__cov_SUV7p8hF8R_tajG59h5NCQ.s['34']++;
this.loadMore = fetch;
}
__cov_SUV7p8hF8R_tajG59h5NCQ.s['35']++;
module.exports = {
controller: StreamContentController,
controllerAs: 'vm',
bindings: {
search: '<'
},
template: require('../templates/stream-content.html')
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment