190 Commits

Author SHA1 Message Date
jos
5dd0a9ba9c Get bundle working (with lazy loading) 2019-01-02 10:03:05 +01:00
jos
c32d410565 Refactor functions create and core. Use the new index files from all unit tests 2018-12-19 18:08:01 +01:00
jos
4b3561e426 Use math.evaluate everywhere in the unit tests 2018-12-05 12:22:21 +01:00
jos
5e8896471a Fix loading functions twice 2018-11-10 10:18:53 +01:00
jos
9faf91f697 Convert all data types, converted all algebra functions. Fixes in order of importing factories. 2018-11-08 15:02:18 +01:00
jos
2fd6cbd568 Converted matrix classes. Fixes in dependency resolving/ordering. 2018-11-07 12:38:00 +01:00
jos
f6b524a966 Use object destructuring in factory function callback. Rename typeof to typeOf. Only pass dependencies in scope to factory function. 2018-11-06 09:17:21 +01:00
jos
c1a8004a12 - Created a util function factory
- Implemented resolving dependencies
- Converted the first few factory functions
2018-11-05 17:27:42 +01:00
jos
a2ae756fd1 Remove semicolons 2018-10-31 21:18:51 +01:00
jos
247aeabffa Refactor all unit tests to ES6 import/export 2018-10-31 21:17:23 +01:00
Eric Mansfield
d23d8c71a4 Chained conditionals (#1267)
* Minimally working

* Added tests, toString

* Added tests for evaluation

* Minor changes

* Added a line in the docs about chained conditionals

* Documentation, replacing var and let with const
2018-10-04 20:26:39 +02:00
greenkeeper[bot]
c5971b371a Update standard to the latest version 🚀 (#1226)
* chore(package): update standard to version 12.0.0

* update to new lint version with --fix

I believe this mainly adds whitespace to `{}`'s.

* Replace assert.equal with assert.strictEqual

This breaks a lot of tests which I will endevour to fix in the next
commits.

* Fix most errors due to assert.strictEquals

Some instances of `strictEquals` are replaced by `deepEquals`.
`toString` has been used to make some string comparisions explicit.
Tests will still fail untill #1236 and #1237 are fixed.

* Fix assertion erros due to -0

With node 10, assert.strictEqual no longer considers `0 === -0`.
I missed these first time round as I was using node 8.

* Put toString correct side of bracket

I was converting the constructor to a string rather
than the result of the computation. Oops.

* Fixed #1236: quantileSeq has inconsistant return

* Update package-lock

* Fixed #1237: norm sometimes returning a complex number instead of number

* Fix cli tests

* More changes for standardjs, and fixes in unit tests
2018-09-08 16:33:58 +02:00
jos
f6f7bd2b25 Fixed #1088: function arguments not being passed to rawArgs functions 2018-07-04 14:05:07 +02:00
jos
2288da7e5d Oops skipping all but one test 2018-07-04 12:49:55 +02:00
jos
7d452c6524 Fix skipped unit tests 2018-07-04 12:48:33 +02:00
jos
88263c47c7 Woohoo fixed the last lint errors 2018-06-13 21:51:09 +02:00
jos
0583771e4e Cleanup unused variables and imports 2018-06-13 17:25:51 +02:00
jos
0513898a4b Fix using new for side effects 2018-06-13 16:31:18 +02:00
jos
b6b36bfd9b Use strict equality checks everywhere (=== and !==) 2018-06-13 15:02:21 +02:00
jos
17f07ec098 Fixed incompatibility with v4 (index.js file) 2018-06-13 14:02:50 +02:00
jos
b3b96749bf Refactored var into const/let, and removed a lot of semicolons 2018-06-13 12:21:14 +02:00
jos
934ea83df7 Fixed linting issues "Expected consistent spacing" 2018-06-12 21:38:11 +02:00
jos
c2777c856b Fixed linting issues "Unexpected template string expression" 2018-06-12 21:18:45 +02:00
jos
024b2a9e26 Fix most lint errors using npx standard --fix 2018-06-10 20:28:27 +02:00
jos
635cd0b574 Revert using /lib/ in tests, use /src/ again. Fixed coverage testing. WIP 2018-06-06 22:11:52 +02:00
jos
79071b5e4f Fixed npm run test:browser not working (WIP) 2018-06-06 21:30:41 +02:00
jos
0c084b8e20 npm test working now 2018-06-06 15:36:36 +02:00
jos
7fefa33d84 Fixed #1077: Serialization/deserialization to JSON with reviver not being supported by nodes 2018-04-04 22:09:43 +02:00
jos
a11dfa9bcc Merge branch 'v4' into v4_binary_operator_node 2018-01-31 14:23:34 +01:00
jos
8f25ee7df0 Updated unit test in ConstantNode 2018-01-31 11:32:00 +01:00
jos
ece963bcdd Merge branch 'develop' into v4
# Conflicts:
#	lib/expression/node/ConstantNode.js
2018-01-31 11:28:14 +01:00
jos
82b41e696a - Implemented OperatorNode.isUnary and OperatorNode.isBinary.
- Explicit checks for number of arguments everywhere working with `OperatorNode` and `FunctionNode`.
- Fixed #1014: derivative silently ignoring additional arguments.
2018-01-31 11:00:39 +01:00
Max Bruckner
9126130794 toTex: Escape special characters in strings 2018-01-31 02:54:24 +01:00
jos
0b6c0c13f7 Merge branch 'v4' into v4_constant_node
# Conflicts:
#	HISTORY.md
2018-01-27 16:58:17 +01:00
jos
5efbb25da8 Merge branch 'develop' into v4
# Conflicts:
#	HISTORY.md
2018-01-27 16:57:24 +01:00
Harry Sarson
332ecf3d5d
adds failing test when implicit product is mapped 2018-01-27 14:21:36 +00:00
jos
4fcc9d231a Added a few more unit tests for ConstantNode 2018-01-25 20:29:43 +01:00
Max Bruckner
4a7e956242 ConstantNode: Add Fraction specific latex output. 2018-01-25 20:14:06 +01:00
jos
924299c42b Changed ConstantNode(valueStr, valueType) to ConstantNode(value) (breaking change) 2018-01-23 12:08:29 +01:00
jos
1192bb6bbc Implemented compile without eval (see #1019) 2018-01-21 18:13:27 +01:00
Max Bruckner
b2857392bd OperatorNode: Fix implicit multiplication
Fixes implicit multiplication when parenthesis is 'auto' and operands
are ConstantNodes.

This is handled by detecting that case and printing parentheses for
ParenthesisNodes even though they normally wouldn't with parenthesis
set to 'auto'.
2017-08-13 20:57:41 +02:00
jos
967e65cceb Refactored usage of properties .isNode, .isSymbolNode, etc. into using functions like type.isNode(x) for security 2017-08-12 14:38:03 +02:00
jos
a18f2068f3 Fixed toString of a parsed expression tree containing an immediately invoked function assignment not being wrapped in parenthesis 2017-08-12 11:03:19 +02:00
jos
27660d8c00 Some more security measures 2017-05-05 21:08:23 +02:00
jos
19faeac16c Escape function names and properties 2017-04-24 21:36:00 +02:00
jos
c259c936ec Refactored compile into a factory function 2017-04-22 17:12:38 +02:00
jos
a7bd4cd833 Register _compile as separate functions 2017-04-22 16:49:22 +02:00
jos
ee6efa3768 Only allow accessing/assigning properties on plain objects. Only allow calling known methods. 2017-04-08 15:32:10 +02:00
jos
f8370bdaf1 Fixed #790: Expression parser did not pass function arguments of enclosing functions via scope to functions having rawArgs = true 2017-02-05 13:50:06 +01:00
jos
79993ceac7 Fixed #765: FunctionAssignmentNode.toString() returning a string incompatible with the function assignment syntax 2016-12-18 13:29:21 +01:00