Commit f25f128
authored
When loading GeoJSON data containing boolean fields with "yes"/"no"
string values, type-analyzer correctly classifies the field as boolean,
but the kepler.gl parse function only recognized "true"/"True"/"TRUE"/"1"
as truthy. This caused all "yes" values to be incorrectly parsed as false.
Align the boolean parse function with type-analyzer's boolean recognition
by using case-insensitive comparison via String.toLowerCase(). The parser
now correctly handles "yes"/"Yes"/"YES" as true and "no"/"No"/"NO" as
false, matching the BOOLEAN_TRUE_VALUES and BOOLEAN_FALSE_VALUES defined
in type-analyzer.
Also expand boolean test coverage to include yes/no variants and
additional case combinations (TRUE, false, FALSE).
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
1 parent be6ba64 commit f25f128
2 files changed
Lines changed: 42 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
451 | 469 | | |
452 | | - | |
453 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
454 | 489 | | |
455 | 490 | | |
456 | 491 | | |
| |||
0 commit comments