Skip to content

Commit

Permalink
mark startsWith() and endsWith() helpers as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka committed May 10, 2023
1 parent c21eccc commit 4c4046c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/helpers/string-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export const getBeforeRegExp = (str, rx) => {
/**
* Checks whether the string starts with the substring
*
* @deprecated use String.prototype.startsWith() instead. AG-18883
*
* @param {string} str full string
* @param {string} prefix substring
* @returns {boolean} if string start with the substring
Expand All @@ -103,6 +105,8 @@ export const startsWith = (str, prefix) => {
/**
* Checks whether the string ends with the substring
*
* @deprecated use String.prototype.endsWith() instead. AG-18883
*
* @param {string} str full string
* @param {string} ending substring
* @returns {boolean} string ends with the substring
Expand Down

0 comments on commit 4c4046c

Please sign in to comment.