MCPcopy
hub / github.com/skygragon/leetcode-cli / getCategory

Function getCategory

lib/plugins/leetcode.js:61–71  ·  view source on GitHub ↗
(category, queue, cb)

Source from the content-addressed store, hash-verified

59 log.debug('running leetcode.getProblems');
60 let problems = [];
61 const getCategory = function(category, queue, cb) {
62 plugin.getCategoryProblems(category, function(e, _problems) {
63 if (e) {
64 log.debug(category + ': failed to getProblems: ' + e.msg);
65 } else {
66 log.debug(category + ': getProblems got ' + _problems.length + ' problems');
67 problems = problems.concat(_problems);
68 }
69 return cb(e);
70 });
71 };
72
73 spin = h.spin('Downloading problems');
74 const q = new Queue(config.sys.categories, {}, getCategory);

Callers

nothing calls this directly

Calls 1

cbFunction · 0.85

Tested by

no test coverage detected