dot.dot.dot.exampol

This commit is contained in:
Captain Nick Lucifer* 2023-03-10 23:21:16 +05:45
commit a0bc2d79de
406 changed files with 34577 additions and 0 deletions

31
node_modules/bunker/example/top/run.js generated vendored Normal file
View file

@ -0,0 +1,31 @@
var bunker = require('bunker');
var fs = require('fs');
var src = fs.readFileSync(__dirname + '/src.js', 'utf8');
var counts = {};
var b = bunker(src);
b.on('node', function (node) {
if (!counts[node.id]) {
counts[node.id] = { times : 0, node : node };
}
counts[node.id].times ++;
});
b.run({
setInterval : setInterval,
clearInterval : clearInterval,
end : function () {
Object.keys(counts)
.sort(function (a, b) {
return counts[b].times - counts[a].times
})
.forEach(function (key) {
var count = counts[key];
console.log(
count.times + ' : ' + count.node.source()
);
})
;
}
});