@magnusopera/fscript 0.88.0 → 0.90.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/FScript.Language/Ast.js +2 -2
- package/dist/FScript.Language/BuiltinFunctions.js +61 -68
- package/dist/FScript.Language/BuiltinSignatures.js +6 -6
- package/dist/FScript.Language/BuiltinTypes.js +1 -1
- package/dist/FScript.Language/Error.js +2 -2
- package/dist/FScript.Language/Eval.js +176 -127
- package/dist/FScript.Language/Execution.js +8 -7
- package/dist/FScript.Language/ExportSignatures.js +5 -5
- package/dist/FScript.Language/HostInterop.js +41 -11
- package/dist/FScript.Language/IncludeResolver.js +15 -19
- package/dist/FScript.Language/Interactive.js +9 -9
- package/dist/FScript.Language/Lexer.js +39 -39
- package/dist/FScript.Language/Parser.js +17 -17
- package/dist/FScript.Language/Pretty.js +5 -5
- package/dist/FScript.Language/Span.js +2 -2
- package/dist/FScript.Language/SupportCollections.js +34 -33
- package/dist/FScript.Language/SupportLibrary.js +21 -20
- package/dist/FScript.Language/TaskFunctions.js +51 -7
- package/dist/FScript.Language/TaskSharingAnalysis.js +310 -129
- package/dist/FScript.Language/Token.js +2 -2
- package/dist/FScript.Language/TypeInfer.js +21 -25
- package/dist/FScript.Language/Types.js +9 -9
- package/dist/FScript.Language/Value.js +11 -8
- package/dist/Library.js +54 -28
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Array.js +325 -198
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/BigInt.js +18 -6
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/CHANGELOG.md +64 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Date.js +1 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Decimal.js +33 -47
- package/dist/fable_modules/fable-library-js.5.27.0/Double.js +78 -0
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/FSharp.Core.js +7 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Global.js +1 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Int32.js +10 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/List.js +230 -157
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Long.js +7 -2
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Map.js +46 -39
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MutableMap.js +76 -96
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MutableSet.js +58 -80
- package/dist/fable_modules/fable-library-js.5.27.0/NumberStyles.js +56 -0
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Numeric.js +72 -4
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Random.js +26 -17
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Range.js +4 -3
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Reflection.js +7 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/RegExp.js +3 -2
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Seq.js +149 -70
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Seq2.js +4 -8
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Set.js +66 -59
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/String.js +160 -39
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/System.Collections.Generic.js +3 -2
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/System.Text.js +10 -10
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/System.js +5 -5
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeOnly.js +1 -1
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Types.js +28 -10
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Util.js +151 -54
- package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/package.json +1 -1
- package/dist/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/dist/fable_modules/fable-library-js.5.24.0/Double.js +0 -53
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Async.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/AsyncBuilder.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/BitConverter.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Boolean.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Char.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Choice.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/CollectionUtil.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/ConditionalWeakTable.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOffset.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOnly.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOnlyTemporal.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeFormat.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeOffsetTemporal.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeTemporal.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Directory.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Encoding.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Environment.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Event.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/FSharp.Collections.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/FSharp.Core.CompilerServices.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/File.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Guid.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MailboxProcessor.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MapUtil.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Native.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Observable.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Option.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Path.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/README.md +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Result.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Stopwatch.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Task.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TaskBuilder.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeOnlyTemporal.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeSpan.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeSpanTemporal.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Timer.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Unicode.13.0.0.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Uri.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/big.d.ts +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/lib/big.js +0 -0
- /package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/quotation.js +0 -0
|
@@ -106,10 +106,43 @@ export function toEnumerable(e) {
|
|
|
106
106
|
return new Enumerable(new Enumerator(e[Symbol.iterator]()));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
// Walks an array by index: the iterator protocol allocates a result object per element
|
|
110
|
+
export class ArrayEnumerator {
|
|
111
|
+
constructor(array) {
|
|
112
|
+
this.current = defaultOf();
|
|
113
|
+
this.index = -1;
|
|
114
|
+
this.array = array;
|
|
115
|
+
}
|
|
116
|
+
["System.Collections.Generic.IEnumerator`1.get_Current"]() {
|
|
117
|
+
return this.current;
|
|
118
|
+
}
|
|
119
|
+
["System.Collections.IEnumerator.get_Current"]() {
|
|
120
|
+
return this.current;
|
|
121
|
+
}
|
|
122
|
+
["System.Collections.IEnumerator.MoveNext"]() {
|
|
123
|
+
const i = ++this.index;
|
|
124
|
+
if (i < this.array.length) {
|
|
125
|
+
this.current = this.array[i];
|
|
126
|
+
return true;
|
|
127
|
+
}
|
|
128
|
+
this.current = defaultOf();
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
["System.Collections.IEnumerator.Reset"]() {
|
|
132
|
+
this.index = -1;
|
|
133
|
+
this.current = defaultOf();
|
|
134
|
+
}
|
|
135
|
+
Dispose() {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
109
139
|
export function getEnumerator(e) {
|
|
110
140
|
if (isEnumerable(e)) {
|
|
111
141
|
return e.GetEnumerator();
|
|
112
142
|
}
|
|
143
|
+
else if (Array.isArray(e)) {
|
|
144
|
+
return new ArrayEnumerator(e);
|
|
145
|
+
}
|
|
113
146
|
else {
|
|
114
147
|
return new Enumerator(e[Symbol.iterator]());
|
|
115
148
|
}
|
|
@@ -235,12 +268,14 @@ export function bigintHash(x) {
|
|
|
235
268
|
return stringHash(x.toString(32));
|
|
236
269
|
}
|
|
237
270
|
// From https://stackoverflow.com/a/37449594
|
|
271
|
+
export function combineHashCode(h1, h2) {
|
|
272
|
+
return ((h1 << 5) + h1) ^ h2;
|
|
273
|
+
}
|
|
238
274
|
export function combineHashCodes(hashes) {
|
|
239
275
|
let h1 = 0;
|
|
240
276
|
const len = hashes.length;
|
|
241
277
|
for (let i = 0; i < len; i++) {
|
|
242
|
-
|
|
243
|
-
h1 = ((h1 << 5) + h1) ^ h2;
|
|
278
|
+
h1 = combineHashCode(h1, hashes[i]);
|
|
244
279
|
}
|
|
245
280
|
return h1;
|
|
246
281
|
}
|
|
@@ -273,12 +308,11 @@ export function dateHash(x) {
|
|
|
273
308
|
return x.getTime();
|
|
274
309
|
}
|
|
275
310
|
export function arrayHash(x) {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
hashes[i] = structuralHash(x[i]);
|
|
311
|
+
let h = 0;
|
|
312
|
+
for (let i = 0; i < x.length; i++) {
|
|
313
|
+
h = combineHashCode(h, structuralHash(x[i]));
|
|
280
314
|
}
|
|
281
|
-
return
|
|
315
|
+
return h;
|
|
282
316
|
}
|
|
283
317
|
export function structuralHash(x) {
|
|
284
318
|
if (x == null) {
|
|
@@ -305,8 +339,13 @@ export function structuralHash(x) {
|
|
|
305
339
|
}
|
|
306
340
|
else if (Object.getPrototypeOf(x)?.constructor === Object) {
|
|
307
341
|
// TODO: check call-stack to prevent cyclic objects?
|
|
308
|
-
|
|
309
|
-
|
|
342
|
+
// Snapshot values before user hashing can mutate the object.
|
|
343
|
+
const values = Object.values(x);
|
|
344
|
+
let hash = 0;
|
|
345
|
+
for (let i = 0; i < values.length; i++) {
|
|
346
|
+
hash = combineHashCode(hash, structuralHash(values[i]));
|
|
347
|
+
}
|
|
348
|
+
return hash;
|
|
310
349
|
}
|
|
311
350
|
else {
|
|
312
351
|
// Classes don't implement GetHashCode by default, but must use identity hashing
|
|
@@ -519,13 +558,67 @@ export function jsOptions(mutator) {
|
|
|
519
558
|
return opts;
|
|
520
559
|
}
|
|
521
560
|
export function round(value, digits = 0) {
|
|
561
|
+
return roundToMode(value, digits, MidpointRounding.ToEven);
|
|
562
|
+
}
|
|
563
|
+
export function roundFloat32(value, digits = 0) {
|
|
564
|
+
return roundToModeFloat32(value, digits, MidpointRounding.ToEven);
|
|
565
|
+
}
|
|
566
|
+
export const MidpointRounding = {
|
|
567
|
+
ToEven: 0,
|
|
568
|
+
AwayFromZero: 1,
|
|
569
|
+
ToZero: 2,
|
|
570
|
+
ToNegativeInfinity: 3,
|
|
571
|
+
ToPositiveInfinity: 4,
|
|
572
|
+
};
|
|
573
|
+
function invalidMidpointRounding(mode) {
|
|
574
|
+
return new Exception(`The value '${mode}' is not valid for this usage of the type MidpointRounding. (Parameter 'mode')`);
|
|
575
|
+
}
|
|
576
|
+
function roundToModeWithLimits(value, digits, mode, maxDigits, limit) {
|
|
577
|
+
if (!(digits >= 0 && digits <= maxDigits)) {
|
|
578
|
+
throw new Exception(`Rounding digits must be between 0 and ${maxDigits}, inclusive. (Parameter 'digits')`);
|
|
579
|
+
}
|
|
580
|
+
// .NET returns values at or above the limit unchanged, without validating mode
|
|
581
|
+
if (!(Math.abs(value) < limit)) {
|
|
582
|
+
return value;
|
|
583
|
+
}
|
|
522
584
|
const m = Math.pow(10, digits);
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
585
|
+
let v = value * m;
|
|
586
|
+
switch (mode) {
|
|
587
|
+
case MidpointRounding.ToEven: {
|
|
588
|
+
const r = Math.round(v);
|
|
589
|
+
v = r - v === 0.5 && r % 2 !== 0 ? r - 1 : r;
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
case MidpointRounding.AwayFromZero: {
|
|
593
|
+
const i = Math.trunc(v);
|
|
594
|
+
const f = v - i;
|
|
595
|
+
v = Math.abs(f) >= 0.5 ? i + Math.sign(f) : i;
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
case MidpointRounding.ToZero:
|
|
599
|
+
v = Math.trunc(v);
|
|
600
|
+
break;
|
|
601
|
+
case MidpointRounding.ToNegativeInfinity:
|
|
602
|
+
v = Math.floor(v);
|
|
603
|
+
break;
|
|
604
|
+
case MidpointRounding.ToPositiveInfinity:
|
|
605
|
+
v = Math.ceil(v);
|
|
606
|
+
break;
|
|
607
|
+
default: throw invalidMidpointRounding(mode);
|
|
608
|
+
}
|
|
609
|
+
return v / m;
|
|
610
|
+
}
|
|
611
|
+
export function roundMode(value, mode) {
|
|
612
|
+
if (!(mode >= MidpointRounding.ToEven && mode <= MidpointRounding.ToPositiveInfinity)) {
|
|
613
|
+
throw invalidMidpointRounding(mode);
|
|
614
|
+
}
|
|
615
|
+
return roundToModeWithLimits(value, 0, mode, 15, 1e16);
|
|
616
|
+
}
|
|
617
|
+
export function roundToMode(value, digits, mode) {
|
|
618
|
+
return roundToModeWithLimits(value, digits, mode, 15, 1e16);
|
|
619
|
+
}
|
|
620
|
+
export function roundToModeFloat32(value, digits, mode) {
|
|
621
|
+
return roundToModeWithLimits(value, digits, mode, 6, 1e8);
|
|
529
622
|
}
|
|
530
623
|
export function sign(x) {
|
|
531
624
|
return x > 0 ? 1 : x < 0 ? -1 : 0;
|
|
@@ -578,28 +671,32 @@ export function clear(col) {
|
|
|
578
671
|
// TODO: throw for other collections?
|
|
579
672
|
}
|
|
580
673
|
}
|
|
581
|
-
|
|
674
|
+
// The original curried function rides on its adapter so curryN can hand it back
|
|
675
|
+
const curriedKey = Symbol("curried");
|
|
676
|
+
function getCurried(f) {
|
|
677
|
+
return f == null ? undefined : f[curriedKey];
|
|
678
|
+
}
|
|
582
679
|
export function uncurry2(f) {
|
|
583
680
|
if (f == null) {
|
|
584
681
|
return null;
|
|
585
682
|
}
|
|
586
683
|
const f2 = (a1, a2) => f(a1)(a2);
|
|
587
|
-
|
|
684
|
+
f2[curriedKey] = f;
|
|
588
685
|
return f2;
|
|
589
686
|
}
|
|
590
687
|
export function curry2(f) {
|
|
591
|
-
return
|
|
688
|
+
return getCurried(f) ?? ((a1) => (a2) => f(a1, a2));
|
|
592
689
|
}
|
|
593
690
|
export function uncurry3(f) {
|
|
594
691
|
if (f == null) {
|
|
595
692
|
return null;
|
|
596
693
|
}
|
|
597
694
|
const f2 = (a1, a2, a3) => f(a1)(a2)(a3);
|
|
598
|
-
|
|
695
|
+
f2[curriedKey] = f;
|
|
599
696
|
return f2;
|
|
600
697
|
}
|
|
601
698
|
export function curry3(f) {
|
|
602
|
-
return
|
|
699
|
+
return getCurried(f)
|
|
603
700
|
?? ((a1) => (a2) => (a3) => f(a1, a2, a3));
|
|
604
701
|
}
|
|
605
702
|
export function uncurry4(f) {
|
|
@@ -607,11 +704,11 @@ export function uncurry4(f) {
|
|
|
607
704
|
return null;
|
|
608
705
|
}
|
|
609
706
|
const f2 = (a1, a2, a3, a4) => f(a1)(a2)(a3)(a4);
|
|
610
|
-
|
|
707
|
+
f2[curriedKey] = f;
|
|
611
708
|
return f2;
|
|
612
709
|
}
|
|
613
710
|
export function curry4(f) {
|
|
614
|
-
return
|
|
711
|
+
return getCurried(f)
|
|
615
712
|
?? ((a1) => (a2) => (a3) => (a4) => f(a1, a2, a3, a4));
|
|
616
713
|
}
|
|
617
714
|
export function uncurry5(f) {
|
|
@@ -619,11 +716,11 @@ export function uncurry5(f) {
|
|
|
619
716
|
return null;
|
|
620
717
|
}
|
|
621
718
|
const f2 = (a1, a2, a3, a4, a5) => f(a1)(a2)(a3)(a4)(a5);
|
|
622
|
-
|
|
719
|
+
f2[curriedKey] = f;
|
|
623
720
|
return f2;
|
|
624
721
|
}
|
|
625
722
|
export function curry5(f) {
|
|
626
|
-
return
|
|
723
|
+
return getCurried(f)
|
|
627
724
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => f(a1, a2, a3, a4, a5));
|
|
628
725
|
}
|
|
629
726
|
export function uncurry6(f) {
|
|
@@ -631,11 +728,11 @@ export function uncurry6(f) {
|
|
|
631
728
|
return null;
|
|
632
729
|
}
|
|
633
730
|
const f2 = (a1, a2, a3, a4, a5, a6) => f(a1)(a2)(a3)(a4)(a5)(a6);
|
|
634
|
-
|
|
731
|
+
f2[curriedKey] = f;
|
|
635
732
|
return f2;
|
|
636
733
|
}
|
|
637
734
|
export function curry6(f) {
|
|
638
|
-
return
|
|
735
|
+
return getCurried(f)
|
|
639
736
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => f(a1, a2, a3, a4, a5, a6));
|
|
640
737
|
}
|
|
641
738
|
export function uncurry7(f) {
|
|
@@ -643,11 +740,11 @@ export function uncurry7(f) {
|
|
|
643
740
|
return null;
|
|
644
741
|
}
|
|
645
742
|
const f2 = (a1, a2, a3, a4, a5, a6, a7) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7);
|
|
646
|
-
|
|
743
|
+
f2[curriedKey] = f;
|
|
647
744
|
return f2;
|
|
648
745
|
}
|
|
649
746
|
export function curry7(f) {
|
|
650
|
-
return
|
|
747
|
+
return getCurried(f)
|
|
651
748
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => f(a1, a2, a3, a4, a5, a6, a7));
|
|
652
749
|
}
|
|
653
750
|
export function uncurry8(f) {
|
|
@@ -655,11 +752,11 @@ export function uncurry8(f) {
|
|
|
655
752
|
return null;
|
|
656
753
|
}
|
|
657
754
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8);
|
|
658
|
-
|
|
755
|
+
f2[curriedKey] = f;
|
|
659
756
|
return f2;
|
|
660
757
|
}
|
|
661
758
|
export function curry8(f) {
|
|
662
|
-
return
|
|
759
|
+
return getCurried(f)
|
|
663
760
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => f(a1, a2, a3, a4, a5, a6, a7, a8));
|
|
664
761
|
}
|
|
665
762
|
export function uncurry9(f) {
|
|
@@ -667,11 +764,11 @@ export function uncurry9(f) {
|
|
|
667
764
|
return null;
|
|
668
765
|
}
|
|
669
766
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9);
|
|
670
|
-
|
|
767
|
+
f2[curriedKey] = f;
|
|
671
768
|
return f2;
|
|
672
769
|
}
|
|
673
770
|
export function curry9(f) {
|
|
674
|
-
return
|
|
771
|
+
return getCurried(f)
|
|
675
772
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
|
676
773
|
}
|
|
677
774
|
export function uncurry10(f) {
|
|
@@ -679,11 +776,11 @@ export function uncurry10(f) {
|
|
|
679
776
|
return null;
|
|
680
777
|
}
|
|
681
778
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10);
|
|
682
|
-
|
|
779
|
+
f2[curriedKey] = f;
|
|
683
780
|
return f2;
|
|
684
781
|
}
|
|
685
782
|
export function curry10(f) {
|
|
686
|
-
return
|
|
783
|
+
return getCurried(f)
|
|
687
784
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10));
|
|
688
785
|
}
|
|
689
786
|
export function uncurry11(f) {
|
|
@@ -691,11 +788,11 @@ export function uncurry11(f) {
|
|
|
691
788
|
return null;
|
|
692
789
|
}
|
|
693
790
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11);
|
|
694
|
-
|
|
791
|
+
f2[curriedKey] = f;
|
|
695
792
|
return f2;
|
|
696
793
|
}
|
|
697
794
|
export function curry11(f) {
|
|
698
|
-
return
|
|
795
|
+
return getCurried(f)
|
|
699
796
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11));
|
|
700
797
|
}
|
|
701
798
|
export function uncurry12(f) {
|
|
@@ -703,11 +800,11 @@ export function uncurry12(f) {
|
|
|
703
800
|
return null;
|
|
704
801
|
}
|
|
705
802
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12);
|
|
706
|
-
|
|
803
|
+
f2[curriedKey] = f;
|
|
707
804
|
return f2;
|
|
708
805
|
}
|
|
709
806
|
export function curry12(f) {
|
|
710
|
-
return
|
|
807
|
+
return getCurried(f)
|
|
711
808
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12));
|
|
712
809
|
}
|
|
713
810
|
export function uncurry13(f) {
|
|
@@ -715,11 +812,11 @@ export function uncurry13(f) {
|
|
|
715
812
|
return null;
|
|
716
813
|
}
|
|
717
814
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13);
|
|
718
|
-
|
|
815
|
+
f2[curriedKey] = f;
|
|
719
816
|
return f2;
|
|
720
817
|
}
|
|
721
818
|
export function curry13(f) {
|
|
722
|
-
return
|
|
819
|
+
return getCurried(f)
|
|
723
820
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13));
|
|
724
821
|
}
|
|
725
822
|
export function uncurry14(f) {
|
|
@@ -727,11 +824,11 @@ export function uncurry14(f) {
|
|
|
727
824
|
return null;
|
|
728
825
|
}
|
|
729
826
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14);
|
|
730
|
-
|
|
827
|
+
f2[curriedKey] = f;
|
|
731
828
|
return f2;
|
|
732
829
|
}
|
|
733
830
|
export function curry14(f) {
|
|
734
|
-
return
|
|
831
|
+
return getCurried(f)
|
|
735
832
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14));
|
|
736
833
|
}
|
|
737
834
|
export function uncurry15(f) {
|
|
@@ -739,11 +836,11 @@ export function uncurry15(f) {
|
|
|
739
836
|
return null;
|
|
740
837
|
}
|
|
741
838
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15);
|
|
742
|
-
|
|
839
|
+
f2[curriedKey] = f;
|
|
743
840
|
return f2;
|
|
744
841
|
}
|
|
745
842
|
export function curry15(f) {
|
|
746
|
-
return
|
|
843
|
+
return getCurried(f)
|
|
747
844
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15));
|
|
748
845
|
}
|
|
749
846
|
export function uncurry16(f) {
|
|
@@ -751,11 +848,11 @@ export function uncurry16(f) {
|
|
|
751
848
|
return null;
|
|
752
849
|
}
|
|
753
850
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15)(a16);
|
|
754
|
-
|
|
851
|
+
f2[curriedKey] = f;
|
|
755
852
|
return f2;
|
|
756
853
|
}
|
|
757
854
|
export function curry16(f) {
|
|
758
|
-
return
|
|
855
|
+
return getCurried(f)
|
|
759
856
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => (a16) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16));
|
|
760
857
|
}
|
|
761
858
|
export function uncurry17(f) {
|
|
@@ -763,11 +860,11 @@ export function uncurry17(f) {
|
|
|
763
860
|
return null;
|
|
764
861
|
}
|
|
765
862
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15)(a16)(a17);
|
|
766
|
-
|
|
863
|
+
f2[curriedKey] = f;
|
|
767
864
|
return f2;
|
|
768
865
|
}
|
|
769
866
|
export function curry17(f) {
|
|
770
|
-
return
|
|
867
|
+
return getCurried(f)
|
|
771
868
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => (a16) => (a17) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17));
|
|
772
869
|
}
|
|
773
870
|
export function uncurry18(f) {
|
|
@@ -775,11 +872,11 @@ export function uncurry18(f) {
|
|
|
775
872
|
return null;
|
|
776
873
|
}
|
|
777
874
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15)(a16)(a17)(a18);
|
|
778
|
-
|
|
875
|
+
f2[curriedKey] = f;
|
|
779
876
|
return f2;
|
|
780
877
|
}
|
|
781
878
|
export function curry18(f) {
|
|
782
|
-
return
|
|
879
|
+
return getCurried(f)
|
|
783
880
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => (a16) => (a17) => (a18) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18));
|
|
784
881
|
}
|
|
785
882
|
export function uncurry19(f) {
|
|
@@ -787,11 +884,11 @@ export function uncurry19(f) {
|
|
|
787
884
|
return null;
|
|
788
885
|
}
|
|
789
886
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15)(a16)(a17)(a18)(a19);
|
|
790
|
-
|
|
887
|
+
f2[curriedKey] = f;
|
|
791
888
|
return f2;
|
|
792
889
|
}
|
|
793
890
|
export function curry19(f) {
|
|
794
|
-
return
|
|
891
|
+
return getCurried(f)
|
|
795
892
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => (a16) => (a17) => (a18) => (a19) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19));
|
|
796
893
|
}
|
|
797
894
|
export function uncurry20(f) {
|
|
@@ -799,11 +896,11 @@ export function uncurry20(f) {
|
|
|
799
896
|
return null;
|
|
800
897
|
}
|
|
801
898
|
const f2 = (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) => f(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)(a15)(a16)(a17)(a18)(a19)(a20);
|
|
802
|
-
|
|
899
|
+
f2[curriedKey] = f;
|
|
803
900
|
return f2;
|
|
804
901
|
}
|
|
805
902
|
export function curry20(f) {
|
|
806
|
-
return
|
|
903
|
+
return getCurried(f)
|
|
807
904
|
?? ((a1) => (a2) => (a3) => (a4) => (a5) => (a6) => (a7) => (a8) => (a9) => (a10) => (a11) => (a12) => (a13) => (a14) => (a15) => (a16) => (a17) => (a18) => (a19) => (a20) => f(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20));
|
|
808
905
|
}
|
|
809
906
|
// More performant method to copy arrays, see #2352
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"Version":"5.
|
|
1
|
+
{"Version":"5.27.0","FableOptions":{"TypedArrays":true,"ClampByteArrays":false,"Language":["JavaScript"],"Define":["FABLE_COMPILER","FABLE_COMPILER_5","FABLE_COMPILER_JAVASCRIPT"],"DebugMode":false,"OptimizeFSharpAst":false,"Verbosity":["Normal"],"FileExtension":".js","TriggeredByDependency":false,"NoReflection":false,"JsTemporal":false},"ProjectPath":"/home/runner/work/FScript/FScript/src/FScript.JavaScript/FScript.JavaScript.fsproj","SourcePaths":["/home/runner/work/FScript/FScript/src/FScript.Language/Span.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Error.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Token.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Ast.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Types.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Value.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Lexer.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Parser.fs","/home/runner/work/FScript/FScript/src/FScript.Language/IncludeResolver.fs","/home/runner/work/FScript/FScript/src/FScript.Language/BuiltinTypes.fs","/home/runner/work/FScript/FScript/src/FScript.Language/HostInterop.fs","/home/runner/work/FScript/FScript/src/FScript.Language/SupportLibrary.fs","/home/runner/work/FScript/FScript/src/FScript.Language/BuiltinSignatures.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Execution.fs","/home/runner/work/FScript/FScript/src/FScript.Language/SupportCollections.fs","/home/runner/work/FScript/FScript/src/FScript.Language/BuiltinFunctions.fs","/home/runner/work/FScript/FScript/src/FScript.Language/TaskFunctions.fs","/home/runner/work/FScript/FScript/src/FScript.Language/TypeInfer.fs","/home/runner/work/FScript/FScript/src/FScript.Language/TaskSharingAnalysis.fs","/home/runner/work/FScript/FScript/src/FScript.Language/ExportSignatures.fs","/home/runner/work/FScript/FScript/src/FScript.Language/DebugHooks.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Eval.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Interactive.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Pretty.fs","/home/runner/work/FScript/FScript/src/FScript.Language/Library.fs","/home/runner/work/FScript/FScript/src/FScript.JavaScript/Library.fs"],"FSharpOptions":["--define:FABLE_COMPILER","--define:FABLE_COMPILER_5","--define:FABLE_COMPILER_JAVASCRIPT","--define:TRACE","--define:RELEASE","--define:NETSTANDARD","--define:NETSTANDARD2_1","--define:NETSTANDARD1_0_OR_GREATER","--define:NETSTANDARD1_1_OR_GREATER","--define:NETSTANDARD1_2_OR_GREATER","--define:NETSTANDARD1_3_OR_GREATER","--define:NETSTANDARD1_4_OR_GREATER","--define:NETSTANDARD1_5_OR_GREATER","--define:NETSTANDARD1_6_OR_GREATER","--define:NETSTANDARD2_0_OR_GREATER","--define:NETSTANDARD2_1_OR_GREATER","--define:NULLABLE","--langversion:preview","--nowarn:FS0988","--targetprofile:netstandard","--noframework","--nologo","--simpleresolution","--nocopyfsharpcore","--nowin32manifest","--warn:3","--fullpaths","--flaterrors","--optimize-","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ValueTuple.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Thread.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.Tasks.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Threading.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Text.RegularExpressions.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Text.Encoding.Extensions.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Text.Encoding.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Numerics.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.InteropServices.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.Extensions.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Runtime.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Primitives.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.Extensions.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Reflection.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Numerics.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Net.Requests.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.IO.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Globalization.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Tracing.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Tools.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Diagnostics.Debug.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Core.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Console.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.TypeConverter.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.Primitives.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.ComponentModel.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Collections.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/System.Collections.Concurrent.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/netstandard.dll","-r:/usr/share/dotnet/packs/NETStandard.Library.Ref/2.1.0/ref/netstandard2.1/mscorlib.dll","-r:/home/runner/.nuget/packages/fsharp.core/10.1.403/lib/netstandard2.1/FSharp.Core.dll","-r:/home/runner/.nuget/packages/fable.core/5.6.1/lib/netstandard2.0/Fable.Core.dll"],"References":["/home/runner/work/FScript/FScript/src/FScript.Language/FScript.Language.fsproj"],"OutDir":["Some","/home/runner/work/FScript/FScript/src/FScript.JavaScript/dist"],"FableLib":null,"FableLibDir":"/home/runner/work/FScript/FScript/src/FScript.JavaScript/dist/fable_modules/fable-library-js.5.27.0","FableModulesDir":"/home/runner/work/FScript/FScript/src/FScript.JavaScript/dist/fable_modules","OutputType":["Library"],"TargetFramework":["Some","netstandard2.1"],"Configuration":"Release","Exclude":[],"Replace":{},"SourceMaps":false,"SourceMapsRoot":null,"TreatWarningsAsErrors":true}
|
package/package.json
CHANGED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { FSharpRef } from "./Types.js";
|
|
2
|
-
import { Exception } from "./Util.js";
|
|
3
|
-
export function tryParse(str, defValue) {
|
|
4
|
-
// TODO: test if value is valid and in range
|
|
5
|
-
if (str != null && /\S/.test(str)) {
|
|
6
|
-
const v = +str.replace("_", "");
|
|
7
|
-
if (!Number.isNaN(v)) {
|
|
8
|
-
defValue.contents = v;
|
|
9
|
-
return true;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
export function parse(str) {
|
|
15
|
-
const defValue = new FSharpRef(0);
|
|
16
|
-
if (tryParse(str, defValue)) {
|
|
17
|
-
return defValue.contents;
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Exception(`The input string ${str} was not in a correct format.`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
// JS Number.isFinite function evals false for NaN
|
|
24
|
-
export function isPositiveInfinity(x) {
|
|
25
|
-
return x === Number.POSITIVE_INFINITY;
|
|
26
|
-
}
|
|
27
|
-
export function isNegativeInfinity(x) {
|
|
28
|
-
return x === Number.NEGATIVE_INFINITY;
|
|
29
|
-
}
|
|
30
|
-
export function isInfinity(x) {
|
|
31
|
-
return x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY;
|
|
32
|
-
}
|
|
33
|
-
export function max(x, y) {
|
|
34
|
-
return Math.max(x, y);
|
|
35
|
-
}
|
|
36
|
-
export function min(x, y) {
|
|
37
|
-
return Math.min(x, y);
|
|
38
|
-
}
|
|
39
|
-
export function maxMagnitude(x, y) {
|
|
40
|
-
if (Number.isNaN(x) || Number.isNaN(y)) {
|
|
41
|
-
return NaN;
|
|
42
|
-
}
|
|
43
|
-
return Math.abs(x) > Math.abs(y) ? x : y;
|
|
44
|
-
}
|
|
45
|
-
export function minMagnitude(x, y) {
|
|
46
|
-
if (Number.isNaN(x) || Number.isNaN(y)) {
|
|
47
|
-
return NaN;
|
|
48
|
-
}
|
|
49
|
-
return Math.abs(x) < Math.abs(y) ? x : y;
|
|
50
|
-
}
|
|
51
|
-
export function clamp(x, min, max) {
|
|
52
|
-
return x < min ? min : x > max ? max : x;
|
|
53
|
-
}
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/AsyncBuilder.js
RENAMED
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/BitConverter.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/CollectionUtil.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOffset.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateOnlyTemporal.js
RENAMED
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeFormat.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/DateTimeTemporal.js
RENAMED
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Directory.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Environment.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/MailboxProcessor.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Observable.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/Stopwatch.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TaskBuilder.js
RENAMED
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeOnlyTemporal.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/fable_modules/{fable-library-js.5.24.0 → fable-library-js.5.27.0}/TimeSpanTemporal.js
RENAMED
|
File without changes
|