You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "amaechler (via GitHub)" <gi...@apache.org> on 2023/02/19 17:47:47 UTC

[GitHub] [druid] amaechler opened a new pull request, #13822: Web console: Replace deprecated `substr` usages with `slice`

amaechler opened a new pull request, #13822:
URL: https://github.com/apache/druid/pull/13822

   ### Description
   
   While reading some code around [`JSON_STRING_FORMATTER`](https://github.com/apache/druid/blob/882ae9f002d5f0c845e4a03d633a1959737066dc/web-console/src/utils/formatter.ts#L36-L68), I noticed some usages of [`String.prototype.substr()
   `](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) which has been deprecated (thanks vscode).
   
   I replaced it with [`slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) which is quite straightforward. The only (relevant) difference is the second argument, which relates to the `endIndex` instead of the `length`.
   
   <hr>
   
   This PR has:
   
   - [x] been self-reviewed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] vogievetsky merged pull request #13822: Web console: Replace deprecated `substr` usages with `slice`

Posted by "vogievetsky (via GitHub)" <gi...@apache.org>.
vogievetsky merged PR #13822:
URL: https://github.com/apache/druid/pull/13822


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org