unclechu / node-deep-extend

Recursive extend module
MIT License
202 stars 53 forks source link

Browser? #19

Open ghost opened 9 years ago

ghost commented 9 years ago

The title does include Node, but I was wondering if this is safe to use in the browser?

mikehayesuk commented 9 years ago

According to the comments in this issue, it's not designed for the browser. I couldn't comment whether it works well across browsers though (was wondering the same myself).

unclechu commented 8 years ago

@chrismbeckett That's right, it wasn't designed for client-side, it have some node-specific stuff like Buffer. May be in the future it will be more compatible with front-end, for v1 release I'm planning to make some API for cloning special objects and move dealing with Buffers and other stuff like this to another sub-module as optional logic. Actually there's some pull request that I'm gonna use as prototype. But for now I guess you should use another module on client-side.

husa commented 8 years ago

Any chance browser support will be released any time soon?

unclechu commented 8 years ago

@husa If I have time for that, but no guarantees.

unclechu commented 8 years ago

Relevant PR: https://github.com/unclechu/node-deep-extend/pull/27

everyonesdesign commented 8 years ago

Browserify implicitly adds a huge Buffer polyfill because of the buffer check. It's a part of documented browserify behavior but I don't think that it's a good idea to use the module in browser with the check.

unclechu commented 8 years ago

@everyonesdesign it will be optional behavior in next major release.