Sha256: 8498e884f4c360384c3a22c2a4686ac7c712dcf7fe0e31ca82a257514d9922a2

Contents?: true

Size: 1013 Bytes

Versions: 44

Compression:

Stored size: 1013 Bytes

Contents

/**
 * @fileoverview Define the abstract class about cursors which manipulate another cursor.
 * @author Toru Nagashima
 */
"use strict";

//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------

const Cursor = require("./cursor");

//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------

/**
 * The abstract class about cursors which manipulate another cursor.
 */
module.exports = class DecorativeCursor extends Cursor {

    /**
     * Initializes this cursor.
     * @param {Cursor} cursor - The cursor to be decorated.
     */
    constructor(cursor) {
        super();
        this.cursor = cursor;
    }

    /** @inheritdoc */
    moveNext() {
        const retv = this.cursor.moveNext();

        this.current = this.cursor.current;

        return retv;
    }
};

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
govuk_publishing_components-17.6.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-17.5.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-17.4.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-17.3.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-17.2.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-17.1.1 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-17.1.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-17.0.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.29.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.28.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.27.1 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.27.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.26.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.25.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.24.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.23.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.22.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.21.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.20.1 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js
govuk_publishing_components-16.20.0 node_modules/standard/node_modules/eslint/lib/token-store/decorative-cursor.js