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

Created on 9 April 2024, 10 months ago
Updated 22 May 2024, 8 months 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 3 days ago

  • Maintained by
  • 🇬🇧United Kingdom @justafish
  • 🇫🇷France @nod_
Created by

🇯🇵Japan tom konda Kanagawa, Japan

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024