Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues in documentation for parsing #3157

Closed
dvd101x opened this issue Feb 14, 2024 · 3 comments
Closed

Issues in documentation for parsing #3157

dvd101x opened this issue Feb 14, 2024 · 3 comments
Labels
documentation Concerns about or enhancements to the mathjs documentation help wanted

Comments

@dvd101x
Copy link
Collaborator

dvd101x commented Feb 14, 2024

Hi,

Documentation states that in a parser getAll() retrieves a map, but it's an object.

- `getAll()`
Retrieve a map with all defined a variables from the parser's scope.

The one that retrieves a map is getAllAsMap but it's not documented, fixing the grammatical error of "defined a variables" probably should be:

  • getAll()
    Retrieve an object with all defined variables in the parser's scope.
  • getAllAsMap()
    Retrieve a map with all defined variables in the parser's scope.

Reference

/**
* Get a map with all defined variables
* @return {Object} values
*/
Parser.prototype.getAll = function () {
return toObject(this.scope)
}
/**
* Get a map with all defined variables
* @return {Map} values
*/
Parser.prototype.getAllAsMap = function () {
return this.scope
}

@josdejong
Copy link
Owner

Good find, we should update and clarify the docs!

@josdejong josdejong added documentation Concerns about or enhancements to the mathjs documentation help wanted labels Feb 14, 2024
@dvd101x dvd101x mentioned this issue Feb 14, 2024
@josdejong
Copy link
Owner

Fixed via #3158

@josdejong
Copy link
Owner

The fix is now published in v12.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Concerns about or enhancements to the mathjs documentation help wanted
Projects
None yet
Development

No branches or pull requests

2 participants