javascript - How to handle error ( "RangeError: Maximum call stack size exceeded" ) in underscore.js package? -


i trying run _ .sample(myarraydata) random data myarraydata in nodejs, sometime getting error

"rangeerror: maximum call stack size exceeded". (_.sample() function present in underscore.js npm module ).

how handle error in nodejs ?

myarraydata dynamic array of data , as

myarraydata = [{'username':'ram','id':'4123414'},{'username':'nitish','id':'986414'},{'username':'kishan','id':'98566'}, . ..];  var sampleuserdata = _.sample(myarraydata) // returns random data eg: {'username':'nitish','id':'986414'}  rangeerror: maximum call stack size exceeded @ function._.sample (/home/instaffic/api/node_modules/underscore/underscore.js) @ /home/instaffic/api/app/crontabs/controllers/autoinstacontroller.js:6278:67 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -