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

Calc refactoring #63

Merged
merged 3 commits into from
Sep 16, 2020
Merged

Calc refactoring #63

merged 3 commits into from
Sep 16, 2020

Conversation

nickovchinnikov
Copy link
Owner

No description provided.

trigonomenticOperators,
} from "./mathOperators";

const [ZERO, FIRST, SECOND, THIRD, FOURTH] = mathPriorities;
const { ZERO, FIRST, SECOND, THIRD, FOURTH } = MathPrioritiesList;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

имхо, но я бы PascalCase оставлял для типов и конструкторов

import {
isOperator,
isTrigonometricOperator,
checkerMathOperatorsPriorities,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

имхо, но методы стоит глаголами называть, а не существительными
потому что глядя на имя функции вообще не ясно, что и как она делает (ну да, проверяет, но что это значит?)

is... ?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkMathOperatorsPriorities - так норм?

return false;
}

if (!Array.isArray(priorities)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

может в таком случае привести к массиву и дальше по стандартной схеме ниже?

@nickovchinnikov nickovchinnikov merged commit b836462 into master Sep 16, 2020
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.

None yet

2 participants