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

Make utils.extend() returns the extended object #120

Closed
wants to merge 1 commit into from

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)
}

@bpierre bpierre closed this 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.

1 participant