All Versions
243
Latest Version
Avg Release Cycle
27 days
Latest Release
849 days ago

Changelog History
Page 8

  • v6.2.3 Changes

    October 06, 2019
    • ๐Ÿ›  Fixed #1640: function mean not working for units. Thanks @clintonc.
    • ๐Ÿ›  Fixed #1639: function min listed twice in the "See also" section of the embedded docs of function std.
    • ๐Ÿ‘Œ Improved performance of isPrime, see #1641. Thanks @arguiot.
  • v6.2.2 Changes

    September 23, 2019
    • ๐Ÿ›  Fixed methods map and clone not copying the dotNotation property of IndexNode. Thanks @rianmcguire.
    • ๐Ÿ›  Fixed a typo in the documentation of toHTML. Thanks @maytanthegeek.
    • ๐Ÿ›  Fixed #1615: error in the docs of isNumeric.
    • ๐Ÿ›  Fixed #1628: Cannot call methods on empty strings or numbers with value 0.
  • v6.2.1 Changes

    August 31, 2019
    • ๐Ÿ›  Fixed #1606: function format not working for expressions.
  • v6.2.0 Changes

    August 28, 2019
    • ๐Ÿ‘Œ Improved performance of combinationsWithRep. Thanks @waseemyusuf.
    • โž• Add unit aliases bit and byte.
    • ๐Ÿ›  Fix docs referring to bit and byte instead of bits and bytes.
    • โšก๏ธ Updated dependency [email protected].
  • v6.1.0 Changes

    August 17, 2019
    • ๐Ÿ‘€ Implemented function combinationsWithRep (see #1329). Thanks @waseemyusuf.
  • v6.0.4 Changes

    August 05, 2019
    • ๐Ÿ›  Fixed #1554, #1565: ES Modules where not transpiled to ES5, giving issues on old browsers. Thanks @mockdeep for helping to find a solution.
  • v6.0.3 Changes

    July 07, 2019
    • โž• Add unpkg and jsdelivr fields in package.json pointing to UMD build. Thanks @tmcw.
    • ๐Ÿ›  Fix #1550: nested user defined function not receiving variables of an outer user defined function.
  • v6.0.2 Changes

    June 11, 2019
    • ๐Ÿ›  Fix not being able to set configuration after disabling function import (regression since v6.0.0).
  • v6.0.1 Changes

    June 09, 2019
    • ๐Ÿ›  Fix function reference not published in npm library.
    • ๐Ÿ›  Fix function evaluate and parse missing in generated docs.
  • v6.0.0 Changes

    June 08, 2019

    !!! BE CAREFUL: BREAKING CHANGES !!!

    Most notable changes

    1. Full support for ES6 modules. Support for tree-shaking out of the box.

      Load all functions:

      import * as math from 'mathjs'
      

      Use a few functions:

      import { add, multiply } from 'mathjs'
      

      Load all functions with custom configuration:

      import { create, all } from 'mathjs'
      const config = { number: 'BigNumber' }
      const math = create(all, config)
      

      Load a few functions with custom configuration:

      import { create, addDependencies, multiplyDependencies } from 'mathjs'
      const config = { number: 'BigNumber' }
      const { add, multiply } = create({
        addDependencies,
        multiplyDependencies
      }, config)
      
    2. Support for lightweight, number-only implementations of all functions:

      import { add, multiply } from 'mathjs/number'
      
    3. New dependency injection solution used under the hood.

    ๐Ÿ’ฅ Breaking changes

    • ๐Ÿ‘ Node 6 is no longer supported.

    • Functions config and import are not available anymore in the global context:

      // v5
      import * as mathjs from 'mathjs'
      mathjs.config(...) // error in v6.0.0
      mathjs.import(...) // error in v6.0.0
    

    Instead, create your own mathjs instance and pass config and imports there:

      // v6
      import { create, all } from 'mathjs'
      const config = { number: 'BigNumber' }
      const mathjs = create(all, config)
      mathjs.import(...)
    
    • ๐Ÿ“‡ Renamed function typeof to typeOf, var to variance, and eval to evaluate. (the old function names are reserved keywords which can not be used as a variable name).
    • ๐Ÿ—„ Deprecated the Matrix.storage function. Use math.matrix instead to create a matrix.
    • ๐Ÿ—„ Deprecated function math.expression.parse, use math.parse instead. Was used before for example to customize supported characters by replacing math.parse.isAlpha.
    • ๐Ÿšš Moved all classes like math.type.Unit and math.expression.Parser to math.Unit and math.Parser respectively.
    • ๐Ÿ›  Fixed #1428: transform iterating over replaced nodes. New behavior is that it stops iterating when a node is replaced.
    • โฌ‡๏ธ Dropped support for renaming factory functions when importing them.
    • โฌ‡๏ธ Dropped fake BigNumber support of function erf.
    • โœ‚ Removed all index.js files used to load specific functions instead of all, like:
      // v5
      // ... set up empty instance of mathjs, then load a set of functions:
      math.import(require('mathjs/lib/function/arithmetic'))
    

    Individual functions are now loaded simply like:

      // v6
      import { add, multiply } from 'mathjs'
    

    To set a specific configuration on the functions:

      // v6
      import { create, addDependencies, multiplyDependencies } from 'mathjs'
      const config = { number: 'BigNumber' }
      const math = create({ addDependencies, multiplyDependencies }, config)
    

    See example advanced/custom_loading.js.

    • โšก๏ธ Updated the values of all physical units to their latest official values. See #1529. Thanks @ericman314.

    Non breaking changes

    • ๐Ÿ›  Implemented units t, tonne, bel, decibel, dB, and prefixes for candela. Thanks @mcvladthegoat.
    • ๐Ÿ›  Fixed epsilon setting being applied globally to Complex numbers.
    • ๐Ÿ›  Fix math.simplify('add(2, 3)') throwing an error.
    • ๐Ÿ›  Fix #1530: number formatting first applied lowerExp and upperExp and after that rounded the value instead of the other way around.
    • ๐Ÿ›  Fix #1473: remove 'use strict' in every file, not needed anymore.