Skip to content
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

feat: override array as primitive when deep merge #1

Merged
merged 6 commits into from
Mar 6, 2017
Merged

Conversation

popomore
Copy link
Member

@popomore popomore commented Mar 6, 2017

@mention-bot
Copy link

@popomore, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ljharb, @justmoon and @vvo to be potential reviewers.

@popomore popomore requested a review from fengmk2 March 6, 2017 08:25
index.js Outdated
// Never move original objects, clone them
target[name] = extend(deep, clone, copy);
// Recurse if we're merging plain objects
if (deep && copy && isPlainObject(copy)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tab 换成空格?

@popomore
Copy link
Member Author

popomore commented Mar 6, 2017

就第一个 commit 改了代码

@popomore
Copy link
Member Author

popomore commented Mar 6, 2017

tape 先不改了

@ljharb
Copy link

ljharb commented Mar 6, 2017

um, what? why is this forked?

@popomore
Copy link
Member Author

popomore commented Mar 6, 2017

@ljharb the array merging is not expected for us, it's like object, but it's strange when we merge two array config.

@fengmk2
Copy link
Member

fengmk2 commented Mar 6, 2017

Or extend can accept an option to impl this feature? @ljharb

@popomore
Copy link
Member Author

popomore commented Mar 6, 2017

it's not easy to give another opt for node-extend

@popomore
Copy link
Member Author

popomore commented Mar 6, 2017

先合这个?

@fengmk2 fengmk2 merged commit 00c66c0 into master Mar 6, 2017
@fengmk2 fengmk2 deleted the array-override branch March 6, 2017 15:31
@fengmk2
Copy link
Member

fengmk2 commented Mar 6, 2017

@popomore 你来发

@popomore
Copy link
Member Author

popomore commented Mar 6, 2017

fengmk2 pushed a commit that referenced this pull request Jun 15, 2024
[skip ci]

## [4.0.0](v3.0.0...v4.0.0) (2024-06-15)

### ⚠ BREAKING CHANGES

* drop Node.js < 18.7.0 support

eggjs/egg#5257

### Features

* override array as primitive when deep merge ([#1](#1)) ([00c66c0](00c66c0))
* support cjs and esm both ([#4](#4)) ([378e295](378e295))

### Bug Fixes

* __proto__ copy ([#2](#2)) ([aa332a5](aa332a5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants