79 Commits

Author SHA1 Message Date
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
949261f92b Refactored usage of properties .isRange, .isIndex, .isResultSet, and .isHelp for their (safe) function equivalents 2017-08-12 13:31:09 +02:00
jos
e10dd5bce5 Refactored x && x.isBigNumber === true into type.isBigNumber(x) 2017-08-12 11:54:53 +02:00
Nekomajin42
9678d1a067 Change escape-goat to native escape function 2017-06-06 12:06:58 +02:00
Nekomajin42
e7aa5b4ec9 fix the escaping errors 2017-06-01 16:02:20 +02:00
Nekomajin42
e18cca6153 Revert "Revert "Use escape goat""
This reverts commit f83c88237f02edf7595e375606c1a0eaaa6ce50c.
2017-06-01 08:36:04 +02:00
Nekomajin42
f83c88237f Revert "Use escape goat"
This reverts commit 51e1b601b64d0bb782590e95c7a74bbb7fb179ff.
2017-06-01 08:35:47 +02:00
Nekomajin42
51e1b601b6 Use escape goat 2017-06-01 08:19:16 +02:00
Nekomajin42
7301b6fcf9 Implement toHTML() to Nodes
toHTML() method to each Node, and update in the docs
2017-05-21 15:47:43 +02:00
jos
27660d8c00 Some more security measures 2017-05-05 21:08:23 +02:00
jos
aef6203049 Use safe function arguments internally 2017-05-05 17:25:21 +02:00
jos
73b774a51b Use safe map, forEach, join 2017-05-05 12:32:21 +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
a60a70e6b9 Store dot notation in IndexNode 2016-02-27 11:36:47 +01:00
jos
2869c37af9 Renamed Index.ranges to Index.dimensions 2016-02-26 20:51:09 +01:00
jos
4d1cd06285 Implemented new AssignmentNode and everything around it. Changed matrices not to clone elements when getting/setting a subset 2016-02-26 15:30:17 +01:00
jos
9173fbd3b8 Large refactoring of nodes: AssignmentNode. UpdateNode, AccessorNode, IndexNode 2016-02-25 15:02:44 +01:00
jos
fad5d8cc07 Merged parseFunctions and parseIndex into parseAccessors. Restricted support for implicit multiplication, execute as accessors instead 2016-01-09 21:11:29 +01:00
jos
edf4e24e21 Some refactoring 2016-01-02 20:57:13 +01:00
jos
050573f4f3 Some refactoring 2016-01-02 20:46:12 +01:00
jos
476b75b33b Fixed a bug in the toString method of an IndexNode 2016-01-02 15:56:50 +01:00
jos
2adf01e548 Getting/setting object properties working (still needs a refactoring step) 2016-01-02 15:16:12 +01:00
jos
9ffab397b6 Fixed #485: Scoping issue with variables both used globally as well as in a function definition 2015-11-28 21:20:25 +01:00
jos
ee52d4907a Removed some unused references 2015-07-31 09:23:09 +02:00
jos
658990a49b Moved Range and Index under lib/type/matrix. Renamed the file Index.js to MatrixIndex.js to prevent name conflicts on Windows. Added an index.js file in lib/function 2015-07-12 20:21:27 +02:00
jos
6c7bf4acf0 Removed boolean, string, and null from the list with argument types, only leaving the directly supported types (which types can be converted to supported types is determined externally). Consistently renamed primitive types lower case (boolean, string, number, null) and non-primitive types uppercase (Complex, BigNumber, Function, Array, ...). 2015-05-20 21:08:26 +02:00
Max Bruckner
3f217cefdd toTex: no global configuration. Only pass around one local object 2015-05-16 13:30:25 +02:00
Max Bruckner
c0e1b2d268 toString: no global configuration. Only pass around one local object 2015-05-16 13:29:55 +02:00
Max Bruckner
a347405a98 toString: implement callbacks and local configuration 2015-05-16 13:28:51 +02:00
Max Bruckner
291d620972 Pass local configuration to toTex functions 2015-05-16 13:27:48 +02:00
Max Bruckner
aa7ca9178f Implement 'all' parenthesis option 2015-05-08 09:07:15 +02:00
Max Bruckner
bc2c29be8c Make _toString functions call the wrapper 2015-05-07 10:12:32 +02:00
jos
06b9664b87 Removed more instanceof checks 2015-05-05 15:21:57 +02:00
jos
7e3eda8603 Moved all data types and their construction functions into a folder of their own under ./lib/type 2015-05-05 13:51:24 +02:00
jos
e348cb70a2 Refactored Range and Index. Reorganized index.js 2015-04-30 20:36:45 +02:00
Max Bruckner
6235fd6ce1 Make toString a wrapper around _toString
This enables preparating the node tree in `toString` before generating
the actual string output with `_toString` methods
2015-04-30 00:12:54 +02:00
Max Bruckner
8282f424c2 Use the prototype for is<Node> instead of the constructor 2015-04-28 20:13:53 +02:00
Max Bruckner
1c76430dda Get rid of 'instanceof' for Nodes (except for constructors) 2015-04-28 10:09:19 +02:00
Max Bruckner
250707b668 Convert the isNode function into a boolean property. 2015-04-28 09:56:01 +02:00
Max Bruckner
390a0060b4 Add is<NameOfNode> property to enable type checking across constructors 2015-04-28 09:14:53 +02:00
jos
d3d3212633 Refactored all nodes into factory functions (see #342) 2015-04-26 21:25:31 +02:00
jos
6e96d5a808 Merge branch 'develop' into v2
Conflicts:
	HISTORY.md
	bower.json
	component.json
	dist/math.js
	dist/math.map
	dist/math.min.js
	lib/function/arithmetic/abs.js
	lib/function/probability/gamma.js
	lib/version.js
	package.json
2015-04-22 21:43:56 +02:00
Max Bruckner
753a0e7893 IndexNode.toTex: Bugfix: execute toTex on Range Arguments
Also changes the Layout of the LaTeX output of IndexNode.
2015-04-19 09:49:08 +02:00
jos
349e9845e8 Merge branch 'develop' into v2_merge
Conflicts:
	HISTORY.md
	bower.json
	component.json
	dist/math.js
	dist/math.map
	dist/math.min.js
	docs/reference/units.md
	lib/version.js
	package.json
	test/function/construction/chain.test.js
	test/function/matrix/det.test.js
	test/function/matrix/transpose.test.js
	test/function/utils/import.test.js
2015-04-13 21:42:43 +02:00
jos
3150e21c8e Fixed #313: parsed functions did not handle recursive calls correctly 2015-04-09 20:29:51 +02:00
jos
8a68bb56e4 Merged math.js v1.5 into v2. Format support of functions eye and diag still needs to be fixed 2015-03-31 22:07:47 +02:00
jos
5cab0641e9 Simplified the factory structure a little bit. Reworked reviver and BigNumber to factories 2015-03-26 21:03:55 +01:00
Max Bruckner
e04dfd26bc Rename customFuncions to callbacks 2015-03-17 18:30:26 +01:00
Max Bruckner
35ce7f7fb4 Make Node.toTex a wrapper like Node.compile
Node.prototype.toTex is now a wrapper that calls the node's _toTex
2015-03-13 21:23:14 +01:00