File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 3
3
import * as Pervasives from "rescript/lib/es6/pervasives.js" ;
4
4
import * as Core__Array from "./Core__Array.mjs" ;
5
5
6
+ function equal ( a , b ) {
7
+ return a === b ;
8
+ }
9
+
10
+ function compare ( a , b ) {
11
+ return a - b | 0 ;
12
+ }
13
+
6
14
function fromString ( radix , x ) {
7
15
var maybeInt = radix !== undefined ? parseInt ( x , radix ) : parseInt ( x ) ;
8
16
if ( isNaN ( maybeInt ) || maybeInt > 2147483647 || maybeInt < - 2147483648 ) {
@@ -54,6 +62,8 @@ var Constants = {
54
62
55
63
export {
56
64
Constants ,
65
+ equal ,
66
+ compare ,
57
67
fromString ,
58
68
range ,
59
69
rangeWithOptions ,
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ module Constants = {
3
3
@inline let maxValue = 2147483647
4
4
}
5
5
6
+ let equal = (a : int , b : int ) => a === b
7
+
8
+ let compare = (a , b ) => a - b
9
+
6
10
@send external toExponential : int => string = "toExponential"
7
11
@send external toExponentialWithPrecision : (int , ~digits : int ) => string = "toExponential"
8
12
Original file line number Diff line number Diff line change @@ -56,6 +56,10 @@ module Constants: {
56
56
let maxValue : int
57
57
}
58
58
59
+ let equal : (int , int ) => bool
60
+
61
+ let compare : (int , int ) => int
62
+
59
63
/**
60
64
`toExponential(n)` return a `string` representing the given value in exponential
61
65
notation.
You can’t perform that action at this time.
0 commit comments