property assignment number conversion

Aperta
#80 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@quarkus ci sta già lavorando.

Dal 30/1/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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 ..

Lingua principale
JavaScript
Stelle
30
Fork
5
Merge medio
1h 57m
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di webtides/element-js

Tutte le issue di webtides/element-js

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.