* Optimize the map and forEach functions in DenseMatrix.js
* Changed index back to Array from Uint32Array and clone it using index.slice(0) instead of [...index]
* Fixed merge conflicts with the fast callback optimization
* Fixed the documentation for _forEach()
* Fixed _forEach comment and made it return an immutable index array
* Resolved DenseMatrix unit test suggestions
---------
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
* Implement reduceCallback
* Add jsdocs
* implement simplifyCallback in other functions
* Moved recurse to array.js
* Format
* Separate transform callback
* forEach transform
* Renamed applyCallback to simplifyCallback
* Simplified index transform
* renamed to reducedCallback and simplifiedCallback to simpleCallback
* chore: fix linting issue
* Added forEach benchmark
* renamed simplifyCallback to optimizeCallback
---------
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
* fix: disable parser functions in the CLI (security issue)
* fix: ensure `ObjectWrappingMap` doesn't allow deleting unsafe properties (security issue)
* fix: enable using methods and (safe) properties on plain arrays
* docs: update the "Less vulnerable expression parser" section in the docs
* chore: fix typos and linting issues
* chore: keep functions like `simplify` enabled in the CLI
* docs: update the security page
* fix: ensure `ObjectWrappingMap.keys` cannot list unsafe properties
* fix: when overwriting a rawArgs function with a non-rawArgs function it was still called with raw arguments
* docs: fix a typo
* Removed maxArgumentCount in favor of applyCallback
* Making a pure _recurse function
* Added cbrt tests, removed unnecesary changes in functions.
* Fixed main bottleneck
* Restored back function before unintended change
* Fix format
---------
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
* feat: export util functions `isMap`, `isPartitionedMap`, and `isObjectWrappingMap` and improve the documentation of `scope` (see #3150)
* chore: fix broken unit tests
* docs: refine the explanation about scopes
* fix: types static method for Unit class
Changes unit interface to declare class to enable the adding of static methods.
* refactor: change to not using declare class
* fix: adds more unit static methods and updates tests
* chore: moves test from wrong location
* fix: adds additional static methods and updates jsDocs
---------
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
1 US gallon is defined as 231 cubic inches, which is exactly 3.785411784 L (since 1 inch is defined as 25.4 mm). Other units are defined against the gallon.
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
* nearlyEqual with absolute and relative tolerances
* Format
* nearlyEqual for bigNumber
* Added skip for NaN
* Reduce diff a bit
* Issue with examples in jsdcos
* Updated all calls for nearlyEqual
* Fixed failing tests
* Changed epsilon to relTol, absTol
* Changed references to epsilon in docs and tests
* Added warning for config.epsilon
* Fix warning in zeta.test
* Added config test
* Added sinon to test console.warn
---------
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
* Use referToSelf() to recursively check if various types are NaN in an array or matrix
* fix array test description from isNegative to isNaN
* Add test for units in a matrix
---------
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
* Fixing rounding bug from issue 3100
* Corrected syntax and converted if...else to logic using ternary operator
* Removing nearlyEqual comparison because a false
return value was mathematically impossible by
user input.
Adding dynamic epsilon logic to cover cases when
a user requests to round a number to a higher
precision than epsilon in the config file.
Also adding tests to cover dynamic epsilon cases.
* Removing dynamic epsilon and adding test for changing config.epsilon during runtime
* Reintroducing nearly equal verification for
round function.
Adding test case for changing epsilon at runtime.
Both tests for changing epsilon at runtime also
verify the false nearlyEqual scenario.
---------
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>
* fix: mode type signatures
* Add ts tests for mode
* Add assertions mode type tests
* Update author Rich in AUTHORS file
---------
Co-authored-by: Rich Martinez <richmartinez@Edinas-MacBook-Pro.local>
Co-authored-by: Jos de Jong <wjosdejong@gmail.com>