Skip to content

take number type of inputs as integer#125

Open
omerorhan wants to merge 1 commit intomacek:masterfrom
omerorhan:patch-2
Open

take number type of inputs as integer#125
omerorhan wants to merge 1 commit intomacek:masterfrom
omerorhan:patch-2

Conversation

@omerorhan
Copy link
Copy Markdown

take number type of inputs as integer

take number type of inputs as integer
case "checkbox":
return pair.value === "on" ? true : pair.value;
case "number":
return pair.value = parseInt(pair.value);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

actually, it can be also float, so parseFloat() is better

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