-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fillup method in import-notation #312
base: master
Are you sure you want to change the base?
Conversation
70fd18d
to
0e8ff34
Compare
@@ -38,43 +22,41 @@ const BemCellSet = hashSet(cell => | |||
*/ | |||
function parse(importString, scope) { | |||
const main = {}; | |||
scope || (scope = {}); | |||
|
|||
scope && (importString = helpers.fillup(importString, scope)); | |||
|
|||
return Array.from(importString.split(' ').reduce((acc, importToken) => { | |||
const split = importToken.split(':'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется, что split
больше нигде не используется, можно на деструкторизацию заменить:
const [type, value] = importToken.split(':');
main.elem = val; | ||
break; | ||
case 'm': { | ||
const splitMod = val.split('='), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Аналогично — можно заменить на деструкторизацию
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется, что стоит отказаться от 4
версии, она вот-вот прекратит поддерживаться
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
создай плиз issue про это со ссылкой на место, где написано, что она перестанет поддерживаться
&& !~acc.m[cell.mod.name].indexOf(cell.mod.val) | ||
&& acc.m[cell.mod.name].push(cell.mod.val); | ||
cell.tech && (acc.t = cell.tech); | ||
&& !~acc.mod[cell.mod.name].indexOf(cell.mod.val) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ну камон ребята: !~acc.mod[cell.mod.name].indexOf(cell.mod.val)
, запишите нормально
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут везде такое кунфу) но мне тож не нравится
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
через includes?
No description provided.