Skip to content

Conversation

@kaushal-kumar-it
Copy link
Contributor

Resolves #8468.

Description

What is the purpose of this pull request?

This pull request adds a new package: @stdlib/assert/has-to-primitive-symbol-support

The package provides a utility function to determine whether the current JavaScript environment supports the well-known symbol Symbol.toPrimitive.

This addition completes the set of symbol support detection utilities in @stdlib/assert and follows the same structure and conventions as existing packages such as:

  • @stdlib/assert/has-iterator-symbol-support
  • @stdlib/assert/has-is-concat-spreadable-symbol-support
  • @stdlib/assert/has-has-instance-symbol-support

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

  • Implementation mirrors existing assert/has-* symbol-support packages for consistency.
  • Added example, test, and benchmark files following stdlib’s standard structure.
  • Verified locally with make lint, make test, make examples, and make benchmark.
  • All checks passed successfully.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

  • Read, understood, and followed the contributing guidelines.
  • Added implementation in lib/node_modules/@stdlib/assert/has-to-primitive-symbol-support/lib.
  • Added corresponding unit tests in test/test.js.
  • Added example in examples/index.js.
  • Added benchmark in benchmark/benchmark.js.
  • Added documentation in README.md.
  • Verified local build with all tests and linting passing.
  • Confirmed no unrelated changes or commits included.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

@stdlib-js/reviewers

@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Nov 9, 2025
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Nov 9, 2025

Coverage Report

Package Statements Branches Functions Lines
assert/has-to-primitive-symbol-support $\color{green}90/90$
$color{green}+100.00%$
$\color{green}5/5$
$color{green}+100.00%$
$\color{green}1/1$
$color{green}+100.00%$
$\color{green}90/90$
$color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte changed the title Add @stdlib/assert/has-to-primitive-symbol-support feat: add assert/has-to-primitive-symbol-support Nov 9, 2025
@kgryte kgryte added Feature Issue or pull request for adding a new feature. and removed Needs Review A pull request which needs code review. labels Nov 9, 2025
Signed-off-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
@kaushal-kumar-it kaushal-kumar-it changed the title feat: add assert/has-to-primitive-symbol-support feat: add @stdlib/assert/has-to-primitive-symbol-support Nov 9, 2025
Signed-off-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
@kgryte kgryte changed the title feat: add @stdlib/assert/has-to-primitive-symbol-support feat: add assert/has-to-primitive-symbol-support Nov 9, 2025
@kgryte kgryte added the Needs Changes Pull request which needs changes before being merged. label Nov 9, 2025
@kgryte kgryte removed the Needs Changes Pull request which needs changes before being merged. label Nov 9, 2025
Signed-off-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
@kgryte kgryte merged commit b18ecdd into stdlib-js:develop Nov 9, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Issue or pull request for adding a new feature. Good First PR A pull request resolving a Good First Issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: add assert/has-to-primitive-symbol-support

3 participants