property assignment number conversion

Đang mở
#80 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@quarkus đang làm issue này rồi.

Từ ngày 30/1/2023.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

Ngôn ngữ chính
JavaScript
Star
30
Fork
5
Merge trung bình
1 giờ 57 phút
Pull request đã merge (30 ngày)
10

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của webtides/element-js

Tất cả issue của webtides/element-js

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.