🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@Anirudh-020505
Copy link

Summary

This PR resolves #6057 by locking in the existing behavior of
_.range when start > end and no step is provided.

What changed

  • Added explicit test coverage confirming descending behavior
  • Updated JSDoc for _.range to match actual implementation
  • No runtime behavior changes were introduced

Why this approach

Changing _.range behavior would be breaking. Instead, this PR:

  • Preserves backward compatibility
  • Prevents future regressions through tests
  • Aligns documentation with long-standing behavior

Verification

  • Ran npm run test:main
  • All 6798 tests passed

Fixes #6057

@ljharb
Copy link
Member

ljharb commented Dec 5, 2025

The diff on the test file is too large to show. Perhaps there's unrelated formatting changes there too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_.range(10, 0) behavior differs from documentation when step not specified

2 participants