Skip to content

Arguments as an object #63

@shapkarin

Description

@shapkarin

I think that it would be better to use object as argument.
instead of

generate.prototype.createComponent = function(
    module,
    componentName,
    answers,
    answersInner,
    onlyFile, 
    cb
) {}

better is

generate.prototype.createComponent = function({
    module,
    componentName,
    answers,
    answersInner = null,
    onlyFile = false, 
    cb
}) {}

And later use that:

generate.createComponent({
    module: modulename,
    componentName: name,
    cb: function(status) {}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions