Answer the question
In order to leave comments, you need to log in
Behavior of delete nodejs. How to solve the problem of pointers?
Actually there is a module that stores various variables within the entire application. Well, it performs several functions besides this.
The problem arose like this. In the key of one of the objects, the response from the request to the API was saved, there is an array of objects.
Elsewhere, I try to display this array, but I can't show some keys, and I delete them with delete. But they are also removed from the internal property of the object. I used cloning from underscore and it did not help, maybe because there is an array.
Gathered a few examples in the gist. I would like a solution at the function level, so that the independent variable is always returned.
https://gist.github.com/mrspartak/ff05ec7efb623679...
Found a working solution for objects and arrays:
https://gist.github.com/mrspartak/ddc1f9ad39bf8c68... Is the
toaster dead?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question