Some of string comparisons should use String.prototype.startsWith() or String.prototype.endsWith()

Created on 9 April 2024, 3 months ago
Updated 22 May 2024, about 1 month ago

Problem/Motivation

In the Drupal core JavaScript, some of string comparison checks that starting with a specific text or ending with a specific text. I think these comparisons are suitable to use String.prototype.startsWith() or String.prototype.endsWith().

Ref: https://github.com/typescript-eslint/typescript-eslint/issues/285

Proposed resolution

Use String.prototype.startsWith() or String.prototype.endsWith().

Merge request link

https://git.drupalcode.org/project/drupal/-/merge_requests/7411

Remaining tasks

User interface changes

No.

API changes

No.

Data model changes

No.

📌 Task
Status

Fixed

Version

10.3

Component
Javascript 

Last updated 1 minute ago

Created by

🇯🇵Japan Tom Konda

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024