167 Commits

Author SHA1 Message Date
jos
ab1b83a2f6 Remove generated files from repo, make tests independent from generated files 2019-05-12 15:14:13 +02:00
jos
427c39c33b Created ES5 and ES6 entry points 2019-04-28 20:56:08 +02:00
jos
f4d4180cea Move all entry files under ./src/entry 2019-04-24 10:48:01 +02:00
jos
6081360d6a Merged develop into modular_architecture 2019-04-13 16:51:51 +02:00
SzechuanSage
dcbb7483de Add parse tests for row and column functions 2019-03-21 22:30:47 +10:00
jos
d9deed993d Fixed #1418: missing whitespace when stringifying an expression containing "not" 2019-02-27 17:49:35 +01:00
jos
70cbc3ec30 Replace http urls with https where supported 2019-02-27 13:08:42 +01:00
jos
83df09800b Merge branch 'develop' into modular_architecture_merge
# Conflicts:
#	HISTORY.md
#	gulpfile.js
#	package-lock.json
#	package.json
#	src/core/function/typed.js
#	src/expression/transform/index.js
#	src/function/statistics/sum.js
#	src/function/utils/index.js
#	src/type/unit/Unit.js
#	src/version.js
#	test/expression/node/FunctionNode.test.js
#	test/type/unit/function/createUnit.test.js
#	test/utils/bignumber/formatter.test.js
#	test/utils/number.test.js
2019-02-09 21:26:25 +01:00
jos
99da53da0e Flatten everything in a mathjs instance to make it consistent with the ES6 exports. Create deprecation warnings for the old classes and functions 2019-02-07 21:24:51 +01:00
jos
25be459ed3 Merge math.expression.parse into math.parse 2019-02-03 20:30:43 +01:00
jos
078f1dd69f Renamed methods .eval to .evaluate, updated all docs and examples accordingly 2019-01-16 10:11:32 +01:00
jos
5dd0a9ba9c Get bundle working (with lazy loading) 2019-01-02 10:03:05 +01:00
Gold Holk
2032a9d126 Fix object literal enable multiple lines (#1328) (#1349)
* Allow object literal expression be multiple lines

* Add test for multiple lines object literal
2018-12-06 19:37:57 +01:00
jos
4b3561e426 Use math.evaluate everywhere in the unit tests 2018-12-05 12:22:21 +01:00
jos
b92cd833eb Refactored the constants into factories 2018-11-24 20:59:21 +01:00
jos
d7ed170ba5 Converted all function transforms, expression functions, and embedded docs 2018-11-09 11:16:55 +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
jean-emmanuel
710ed1e58f Add support for single quotes strings 2018-08-04 10:27:10 +02:00
jos
0583771e4e Cleanup unused variables and imports 2018-06-13 17:25:51 +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
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
99ab11b234 Dropped constant uninitialized 2018-02-04 13:09:09 +01:00
Jos de Jong
e631771df0
Merge branch 'v4' into v4_fn_implicit_multiplication 2018-02-04 11:58:15 +01:00
Jos de Jong
cdda817d9f
Merge pull request #1036 from ericman314/implicit-multiplication
Implicit multiplication
2018-02-04 11:55:15 +01:00
jos
11b4c03460 Remove support for calling a function returned by a function, parse as implicit multiplication instead. See #1035 2018-02-03 21:52:18 +01:00
Eric Mansfield
090f4c920f Added 'number/number (', and tests 2018-02-03 09:44:30 -07:00
Eric Mansfield
17a4e33ae2 Added tests 2018-02-02 21:14:33 -07:00
jos
3f3d50f7a0 Fixed #833: the constants true, false, null, undefined, NaN, Infinity, and uninitialized are now parsed as ConstantNodes instead of SymbolNodes in the expression parser 2018-01-23 13:55:57 +01:00
jos
8b5396baad Removed the old expression compiler (which uses eval) 2018-01-23 09:19:11 +01:00
jos
1192bb6bbc Implemented compile without eval (see #1019) 2018-01-21 18:13:27 +01:00
jos
8d2d48d81b Fixed a security issue in typed-function allowing arbitrary code execution 2017-11-18 19:39:30 +01:00
jos
601f1942c2 Replace ES6 functionality with ES5 2017-08-06 11:54:59 +02:00
jos
9666c16378 Fixed #846: Issues in the functions map, forEach, and filter when used in the expression parser 2017-07-29 14:05:27 +02:00
jos
469e6bf3cf Fixed #895: added support for the dollar character $ in symbol names 2017-07-10 20:29:30 +02:00
jos
ed5f2cebaf Security fixes in isSafeMethod and some others 2017-05-27 19:51:12 +02:00
jos
64498eddd6 Fixed #861: physical constants not available in the expression parser 2017-05-25 16:13:42 +02:00
jos
f61bb6cf94 Fixed #856: function subset not returning non-primitive scalars from Arrays correctly 2017-05-16 21:41:03 +02:00
jos
5991c24620 Fixed broken unit tests 2017-05-12 13:36:03 +02:00
jos
29d632f1d9 Fixed creating units with an alias not working within the expression parser 2017-05-12 13:28:13 +02:00
jos
8e8e02bec9 Don't clone config itself, only it's childs 2017-04-22 20:14:52 +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
37613aca0c Moved security related tests into a separate file 2017-04-02 13:18:55 +02:00