Skip to content
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

Bug when using big indexes #8

Closed
lmammino opened this issue Sep 7, 2016 · 1 comment
Closed

Bug when using big indexes #8

lmammino opened this issue Sep 7, 2016 · 1 comment

Comments

@lmammino
Copy link
Owner

lmammino commented Sep 7, 2016

Sample code:

var isv = require('indexed-string-variation').default;

var i = 3511326342653452173122134435345;
console.log(i);
console.log(isv('ab')(i));

output:

3.511326342653452e+30
C:\Users\Luciano.Mammino\test\node_modules\indexed-string-variation\lib\index.js:38
      throw new TypeError('index must be a non-negative integer');
      ^

TypeError: index must be a non-negative integer
    at C:\Users\Luciano.Mammino\test\node_modules\indexed-string-variation\lib\index.js:38:13
    at Object.<anonymous> (C:\Users\Luciano.Mammino\test\test.js:5:22)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Function.Module.runMain (module.js:457:10)
    at startup (node.js:138:18)
    at node.js:974:3
@lmammino
Copy link
Owner Author

lmammino commented Sep 7, 2016

this or this might be used to solve the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant