Steven Hartland
70918b6218
fix: number to int conversions ( #474 )
...
Fix toInt32, toUint32 conversions which caused test failures on arm64 by
leveraging the power of go casts to simplify the conversion from float64
to integer types.
2022-11-30 17:55:35 +00:00
andig
4eacda02dd
fix: uint<0 comparisons ( #421 )
...
Remove impossible conditions for uint comparisons.
2021-10-08 09:47:15 +01:00
Steven Hartland
f9375a2569
fix: golang style ( #420 )
...
Fix golang style which was broken by github suggestions spacing.
2021-09-27 23:22:13 +01:00
Boris Kostenko
6d2823e7c9
fix: array sort ( #267 )
...
Fix array sort issue using toIntSign compare function
Fixes #266
2021-09-27 22:59:40 +01:00
Steven Hartland
9297a9abe4
feat: add github action tests and linting ( #418 )
...
Leverage github actions for tests and linting.
This includes fixing a bunch of issues highlighted by golangci
including:
* Dead code.
* Ineffectual assigns.
* Goto warnings.
* Nil return err.
* Reused literal strings.
* Test parameter order.
Also:
* Setup clog.
2021-09-27 16:19:28 +01:00
Robert Krimen
54e1705423
Fix for S9.3.1_A2
2017-01-12 15:54:54 -08:00
Alexander F Rødseth
e3f7ae2533
Consistent use of "value Value"/"vl Value"
2016-06-24 09:53:47 +02:00
Robert Krimen
709a0aa7ff
Value.string(), .float64(), .bool(), etc.
2014-06-06 21:29:40 -07:00
Robert Krimen
b813fe3676
Fix JSON.stringify treating large integers as float64
...
This fixes #80
2014-06-06 21:08:59 -07:00
Robert Krimen
918abeb8d8
The zero value of Value is now defined to be undefined
...
Previously, it was a publically accessible but invalid value (valueEmpty).
* Deprecate internal use of UndefinedValue(), NullValue(), FalseValue(), TrueValue()
* Guard against Empty, Result, Reference values from escaping the package
2014-05-28 21:23:32 -07:00
Robert Krimen
483ab77362
toInteger: Add integerFloat
2013-07-31 21:54:26 -07:00
Robert Krimen
4ebf6416d0
Fix Uint32 Array/String indexing
...
Also, a bunch of toValue_* streamlining
And maybe a few miscellaneous tweaks
2013-06-22 15:49:22 +02:00
Robert Krimen
d1cea5ac62
Fix numberToStringRadix to return "NaN"
2013-02-20 15:55:12 -08:00
Robert Krimen
d6fe0918fe
Fix Number.toString to handle Infinity, NaN better
...
Still broken in other ways, but a little better
2013-02-19 14:11:57 -08:00
Robert Krimen
e06ac35b32
Add _integer and _toInteger
...
A safer toInteger, which it will eventually replace
2013-02-18 17:43:18 -08:00
Robert Krimen
bdaa00884d
toU16/U32/I32 => toUint16/Uint32/Int32
2013-02-18 15:58:48 -08:00
Robert Krimen
a879744c20
Add Go <=> JavaScript type interaction
...
Via reflection for struct, map, and slice/array
Fix #10
2013-02-04 10:31:44 -08:00
Robert Krimen
20d2e8bba6
gofmt
...
Ugh.
2013-01-25 09:59:42 -08:00
Robert Krimen
2a36c82936
toIntegerFloat(Infinity) == Infinity
2012-11-15 15:15:12 -08:00
Robert Krimen
26f8a53978
Accept out-of-range +/-Infinity (instead of NaNing)
2012-11-06 11:06:45 -08:00
Robert Krimen
d5abb3eb0c
Add Math.E, .LN10, .LOG2E, .PI, .SQRT2, etc.
...
E
LN10
LN2
LOG2E
LOG10E
PI
SQRT1_2
SQRT2
2012-10-27 13:22:32 -07:00
Robert Krimen
9afeb64d67
Fix toFloat to parse hexadecimal properly
2012-10-18 11:16:25 -07:00
Robert Krimen
4a8c7ffc00
Initial commit
2012-10-05 18:47:53 -07:00