Mathjs: can i load only what i need?

Created on 26 Sep 2017  路  4Comments  路  Source: josdejong/mathjs

mathjs is too much heavy, more than 60000 lines.
only add subtract multiply divide on bigNumber are needed by me. so, can i just load the these functionalities?

question

Most helpful comment

+1 it would great to be able to import median from 'mathjs/median' like I can with lodash/date-fns etc.

All 4 comments

Yes, see:

http://mathjs.org/docs/custom_bundling.html
http://mathjs.org/examples/advanced/custom_loading.js.html

Depending on your use case, if you're just in need of a bignumber library you may not even need mathjs and can directly use decimal.js (which is used in mathjs).

+1 it would great to be able to import median from 'mathjs/median' like I can with lodash/date-fns etc.

good, thank you all very much
but now,i am directly using use decimal.js as @josdejong suggested me

@davidgilbertson see #71 for a discussion on that

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skgadi picture skgadi  路  3Comments

adamazing picture adamazing  路  4Comments

comex picture comex  路  5Comments

Lakedaemon picture Lakedaemon  路  5Comments

nioate picture nioate  路  4Comments