Skip to content

make utils.extend() return the extended object #121

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

Merged
merged 1 commit into from
Feb 21, 2014

Conversation

bpierre
Copy link

@bpierre bpierre commented Feb 21, 2014

It would allow to do this:

function foo (options) {
    options = utils.extend({
        a: 1 // default option
    }, options)
}

Instead of this:

function foo (optionsExt) {
    var options = {
        a: 1 // default option
    }
    utils.extend(options, optionsExt)
}

@lfac-pt
Copy link

lfac-pt commented Feb 21, 2014

👍 This would make it consistent with the Underscore equivalent

yyx990803 added a commit that referenced this pull request Feb 21, 2014
make utils.extend() return the extended object
@yyx990803 yyx990803 merged commit 29b1803 into vuejs:dev Feb 21, 2014
@bpierre bpierre deleted the extend-return branch February 21, 2014 19:42
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.

3 participants