We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My proposal it to change API of .act() callbacks from
.act()
function(opts, args) { }
to
function(options) { // options = opts + args }
The difference between opts and args in semantical only and only make sense when command is run from the command line
opts
args
It is hard to explain to develepor what the difference between opts and args when it uses COA API to run command
Division into two different arguments makes sense in case when opts is a hash and args is an array
Compare
var BEM = require('bem'); BEM.api.create.block({ tech: ['css', 'js'] }, { names: ['b1', 'b2'] });
and
var BEM = require('bem'); BEM.api.create.block({ names: ['b1', 'b2'], tech: ['css', 'js'] });
/cc @veged
The text was updated successfully, but these errors were encountered:
we can just add args to opts but keep second argument for act function for full backward compatibility
act
Sorry, something went wrong.
@veged Backwards compatibility will broke if there were args and opts with the same name('...') declaration
name('...')
@arikon yep, but that's some kind "unsemantic" and seems nobody do that
No branches or pull requests
My proposal it to change API of
.act()
callbacks fromto
Motivation
The difference between
opts
andargs
in semantical only and only make sense when command is run from the command lineIt is hard to explain to develepor what the difference between
opts
andargs
when it uses COA API to run commandDivision into two different arguments makes sense in case when
opts
is a hash andargs
is an arrayCompare
and
/cc @veged
The text was updated successfully, but these errors were encountered: