Hello,
I am using your library and I detected a problem. When I use your library in a file, it automatically modify the prototype of built-in Array object, without my permission ;)
I was researching and I found that the problem is that NODE_MODULE_CONTEXTS is zero for default so, your library overwrite Array built-in.
If you put the following content in a file, for example prueba.js:
var gauss = require("gauss");
var arreglo=[1,2];
for(var i in arreglo){
console.log(i);
}
You will see that shows the properties that you add to Array. If you put the lines in the REPL, the program will be ok, this happen because the variable NODE_MODULE_CONTEXTS is set different in both cases. See: nodejs/node-v0.x-archive#771
I fixed the problem adding,
In vector.js, line 6:
var Array=function () {};
In timeseries.js, line 6:
var Array = require('./vector');
Best regards,
Hello,
I am using your library and I detected a problem. When I use your library in a file, it automatically modify the prototype of built-in Array object, without my permission ;)
I was researching and I found that the problem is that NODE_MODULE_CONTEXTS is zero for default so, your library overwrite Array built-in.
If you put the following content in a file, for example prueba.js:
var gauss = require("gauss");
var arreglo=[1,2];
for(var i in arreglo){
console.log(i);
}
You will see that shows the properties that you add to Array. If you put the lines in the REPL, the program will be ok, this happen because the variable NODE_MODULE_CONTEXTS is set different in both cases. See: nodejs/node-v0.x-archive#771
I fixed the problem adding,
In vector.js, line 6:
var Array=function () {};
In timeseries.js, line 6:
var Array = require('./vector');
Best regards,