MCPcopy Create free account
hub / github.com/WinterTC55/iter-streams / step

Function step

src/ringbuffer.js:6–27  ·  view source on GitHub ↗
(op)

Source from the content-addressed store, hash-verified

4 return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
5 function verb(n) { return function (v) { return step([n, v]); }; }
6 function step(op) {
7 if (f) throw new TypeError("Generator is already executing.");
8 while (g && (g = 0, op[0] && (_ = 0)), _) try {
9 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
10 if (y = 0, t) op = [op[0] & 2, t.value];
11 switch (op[0]) {
12 case 0: case 1: t = op; break;
13 case 4: _.label++; return { value: op[1], done: false };
14 case 5: _.label++; y = op[1]; op = [0]; continue;
15 case 7: op = _.ops.pop(); _.trys.pop(); continue;
16 default:
17 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
18 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
19 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
20 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
21 if (t[2]) _.ops.pop();
22 _.trys.pop(); continue;
23 }
24 op = body.call(thisArg, _);
25 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
26 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
27 }
28};
29Object.defineProperty(exports, "__esModule", { value: true });
30exports.RingBuffer = void 0;

Callers 1

verbFunction · 0.70

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected