v.slice is not a function Line:805
Opened this issue · 1 comments
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)
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.