MCPcopy Create free account
hub / github.com/nwutils/nw-sample-apps / iterTimes

Function iterTimes

mini-code-edit/cm/keymap/vim.js:61–63  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

59 function pushCountDigit(digit) { return function(cm) {count += digit;} }
60 function popCount() { var i = parseInt(count); count = ""; return i || 1; }
61 function iterTimes(func) {
62 for (var i = 0, c = popCount(); i < c; ++i) func(i, i == c - 1);
63 }
64 function countTimes(func) {
65 if (typeof func == "string") func = CodeMirror.commands[func];
66 return function(cm) { iterTimes(function () { func(cm); }) };

Callers 2

countTimesFunction · 0.85
vim.jsFile · 0.85

Calls 1

popCountFunction · 0.85

Tested by

no test coverage detected