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 variable name more reasonable #381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

creeperyang
Copy link

The variable notClassId is used in https://github.com/Matt-Esch/virtual-dom/blob/master/virtual-hyperscript/parse-tag.js#L6-L20:

var notClassId = /^\.|#/;
// ...
    if (notClassId.test(tagParts[1])) {
        tagName = 'DIV';
    }

The regexp notClassId aims to test whether a string is id or class.

If tagParts[1] is id or class, it means tagName is not specified, set it default to 'DIV'.

So, I think rename it (notClassId) to isClassId is more reasonable.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.503% when pulling c1d98b6 on creeperyang:dev into dcb8a14 on Matt-Esch:master.

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.

2 participants