facebookarchive/prepack

Map NaN and Infinity to null in special case for JSON.parse(JSON.stringify(abstractObject))

Open

#1,010 opened on Sep 27, 2017

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (520 forks)batch import
abstractenhancementhelp wantedtest needed

Repository metrics

Stars
 (14,268 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

If a property value is abstract can possibly be NaN or Infinity, then the abstract value should be wrapped in a conditional expression that returns null at runtime when the abstract values turns out to be NaN or Infinity at runtime.

Contributor guide