-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow Buffer's to be non-iterable #11
Comments
ubenzer
added a commit
to ubenzer/deep-map
that referenced
this issue
Aug 20, 2017
isObject returns true for Date, Buffer objects. This causes iterating into this objects, eventually, you lose the original Date and Buffer objects. Fixes mcmath#11
ubenzer
added a commit
to ubenzer/deep-map
that referenced
this issue
Aug 20, 2017
isObject returns true for Date, Buffer objects. This causes iterating into this objects, eventually, you lose the original Date and Buffer objects. Fixes mcmath#11
I am having the same issue with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello and thanks for this useful library!
I am trying to use this library in a nodejs project of mine. I have a complex object which also includes
Buffer
s. When IdeepMap
on this object, I receive eachBuffer
byte one-by-one in map.The reason is due to
lodash
,isObject
returning true for Buffers:So if I run deep-map like this:
In the response I get:
As it can be seen, although I do nothing on map function, Buffer is not a buffer but a simple object now. Please click this link to run it yourself.
Is it possible to treat Buffers as non-iterable or offer a way to select what should be iterable and what not?
Thanks!
PS. I also see
Date
's are also tried to be iterated and in the end you lose the date value. I updated linked demo to show this as well.The text was updated successfully, but these errors were encountered: