Accept `var` in place of `VAR` as unit for volt-ampere reactive, as specified by IEC and SI

Open Beginner friendly
#3,613 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript
Domain
backend

Research direction

Start with the Unit entry point and reproduce the two examples in the issue to inspect how VAR and var are recognized and formatted. Trace the unit definitions and existing unit tests, then verify that var is accepted while the expected alias behavior for VAR is preserved.

Written by the indexing model from the issue text.

Description

Describe the bug
var, according to the IEC, is the correct unit for volt-ampere reactive, not VAR. The latter is accepted by MathJS, while the former is not!
See here for links and info.

To Reproduce

(new Unit(1, 'VAR')).format() // works. It should not, or only as an alias
(new Unit(1, 'var')).format() // fails. It should!
Dominant language
JavaScript
Stars
15.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from josdejong/mathjs

All issues in josdejong/mathjs

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.