property assignment number conversion

オープン
#80 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@quarkus がすでに取り組んでいます。

2023年1月30日 から。

評価

この issue はまだ評価されていません。

説明

question

Question / Problem.

if a property is assigned with a value "200.000" the property value will be: 200
if a property is assigned with a value "200.001" the property value will be: 200.001

This is perfectly in line with

parseFloat('200.000') -> 200
and
parseFloat('200.001') -> 200.001 (200 plus a fraction)

I don´t know if we can / should actually do something about it, but this feels pretty weird .. maybe we should parse to number as agressive as we do !?

In distinct case there was a number passed to an attribute "count" (200000) than formatted (via Numberformatter) for decimal delimiter and being reassigned to the same prop.
At the end count has a value of 200 which is logical but still weird ..

主要言語
JavaScript
スター
30
フォーク
5
平均マージ
1時間 57分
マージ済み PR(30日)
10

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

webtides/element-js のほかの issue

webtides/element-js の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。