Closed bshefflette closed 6 years ago
hmmmm root cause of that behavior is that the module is using parseInt() to coerce the string instead of Number. I had not realized there were differences in how they handle null, Number( null ) is +0 and parseInt( null ) is NaN.
After reading more about both on the spec decided to perform the coercion with Number() instead of parseInt() . Only 2 functions are using parseInt() at the moment. change checked into v1.0.4wip.
Not sure if this is intended behavior, wanted to bring to your attention so it can be changed or documented.
PRD.util.JSONobj.get( {"aaa":1,"ggg":null}, 'ggg', 'number')
returns NaN