-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use regression.js in a browser #106
Comments
Hi, I found this example and that worked for me https://jsfiddle.net/nagubal/cpxwLf2t/ const getRegression = (data, degre) => { let resultRegression = []; Apparently the module usage has been changed but the documentation was not updated yet |
@Miguel446 that example is using regression.js version 1.3.0 from here: I found an exampe with 1.4.0 at the following link: Anyway, I'd like to be able to use current and future versions, so if anyone has a clue on using the latest version in an HTML, please post it here. After googling a bit I found that there should be a specific build for browsers or a workaround config, as for this example of Vue.js: |
Great article about modules and also the latest regression.js cdn version is 1.4.0 and the npm version is 2.0.1, so unfortunately the developer stopped supporting web browsers some time ago But if you really need the latest version, I found this article about how to use a npm module on html, I’m not sure if it will work but it’s worth giving it a shot |
Hi, the readme states that regression.js works in a browser too, but I can't seem to use it when importing with:
import {regression} from 'regression';
Either I get
ReferenceError: regression is not defined
when using it
or
TypeError: global is undefined
or
TypeError: a is undefined
when using the minified version.
Can anybody provide a strip down HTML example without using node.js or package managers?
Thank you
The text was updated successfully, but these errors were encountered: