Skip to content

[pull] master from trekhleb:master#78

Merged
pull[bot] merged 6 commits into
Uncodedtech:masterfrom
trekhleb:master
Jun 14, 2026
Merged

[pull] master from trekhleb:master#78
pull[bot] merged 6 commits into
Uncodedtech:masterfrom
trekhleb:master

Conversation

@pull

@pull pull Bot commented Jun 14, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

huizixin and others added 6 commits June 14, 2026 08:18
The JSDoc comment states the valid position range is '1 to 75', but the code validates against topMaxValidPosition = 70.

This PR fixes the documentation to match the implementation.
String.prototype.substr() is deprecated and may be removed in future
JavaScript engine versions (Annex B of the ECMAScript specification).

Replaced all occurrences in the codebase with String.prototype.substring():

- src/algorithms/string/rabin-karp/rabinKarp.js
- src/algorithms/cryptography/polynomial-hash/__test__/SimplePolynomialHash.test.js
- src/algorithms/cryptography/polynomial-hash/__test__/PolynomialHash.test.js

The behavior is identical since all substr(start, length) calls are
converted to substring(start, start + length) with the same arguments.

All existing tests pass.
@pull pull Bot locked and limited conversation to collaborators Jun 14, 2026
@pull pull Bot added the ⤵️ pull label Jun 14, 2026
@pull pull Bot merged commit 0ae5dd8 into Uncodedtech:master Jun 14, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants