mljs/ml

how to integrate in browser

Opadera opened this issue ยท 3 comments

Hello,

Can you please post an example how to integrate ml.js with requireJS for use in a browser?

I'm trying to use ML.savitzkyGolay. I dont't get how to integrate the library.

It will be available as the global ML variable. The package is in UMD format and can be "required" within webpack or requireJS.

I don't get a variable ML if I use <script src="https://www.lactame.com/lib/ml/2.2.0/ml.min.js"></script>

I can get functions like ML.AU.SNV and ML.propertyIsEnumerable with
<script src="./src/ml.min.js" charset="utf-8"></script>

or

<script src="https://www.lactame.com/lib/ml/2.2.0/ml.min.js"></script>
...
requirejs(["ML"])

but none of the function mentioned on the GitHub site are available.

I would be very thankful if you can point me in the right direction.

Hello

I don't get a variable ML if I use <script src="https://www.lactame.com/lib/ml/2.2.0/ml.min.js"></script>

This should define window.ML

but none of the function mentioned on the GitHub site are available

The API described in the readme has had significant changes compared to the last release. Please have a look at https://github.com/mljs/ml/tree/v2.2.0

ok, just different names then...
if you point to 2.2.0 in the introduction you should match the "List of inlcuded libraries" to the given structure.

thanks!

True, it's a bit confusing ๐Ÿ˜„