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

v.slice is not a function Line:805 #22

Open
TheSamSmith opened this issue Oct 5, 2016 · 1 comment
Open

v.slice is not a function Line:805 #22

TheSamSmith opened this issue Oct 5, 2016 · 1 comment

Comments

@TheSamSmith
Copy link

C:\Users\Sam\Documents\GitHub\Project\node_modules\number-crunch\crunch.js:805
return rawIn ? a : Array.prototype.slice.call(a).map(function (v) { return ci(v.slice(1)) });
^

TypeError: v.slice is not a function
at C:\Users\Sam\Documents\GitHub\Project\node_modules\number-crunch\crunch.js:805:85
at Array.map (native)
at transformIn (C:\Users\Sam\Documents\GitHub\Project\node_modules\number-crunch\crunch.js:805:54)
at Object.Crunch.nextPrime (C:\Users\Sam\Documents\GitHub\Project\node_modules\number-crunch\crunch.js:1115:25)
at generateKey (C:\Users\Sam\Documents\GitHub\Project\keygen.js:46:14)
at Object. (C:\Users\Sam\Documents\GitHub\Project\keygen.js:7:2)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)

@TheSamSmith TheSamSmith changed the title v.slice is not a function Line:804 v.slice is not a function Line:805 Oct 5, 2016
@vukicevic
Copy link
Owner

This can happen if the input to nextPrime is undefined or not an array. I'll mark this as an enhancement to return undefined or throw an error if the input is not defined or not an array.

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

No branches or pull requests

2 participants