12345678910111213141516171819202122232425262728293031323334353637383940 |
- "use strict";
- const DecorativeCursor = require("./decorative-cursor");
- module.exports = class LimitCursor extends DecorativeCursor {
-
- constructor(cursor, count) {
- super(cursor);
- this.count = count;
- }
-
- moveNext() {
- if (this.count > 0) {
- this.count -= 1;
- return super.moveNext();
- }
- return false;
- }
- };
|