fable-core
Advanced tools
Comparing version 1.0.0-narumi-8 to 1.0.0-narumi-901
{ | ||
"name": "fable-core", | ||
"version": "1.0.0-narumi-8", | ||
"version": "1.0.0-narumi-901", | ||
"description": "Fable core library", | ||
@@ -18,2 +18,2 @@ "repository": { | ||
"homepage": "https://github.com/fable-compiler/Fable#readme" | ||
} | ||
} |
@@ -14,3 +14,3 @@ import FableSymbol from "./Symbol"; | ||
import { fsFormat } from "./String"; | ||
function deflate(v) { | ||
export function deflate(v) { | ||
if (ArrayBuffer.isView(v)) { | ||
@@ -17,0 +17,0 @@ return Array.from(v); |
16
Util.js
@@ -260,5 +260,5 @@ import FSymbol from "./Symbol"; | ||
const iter = fields[Symbol.iterator](); | ||
let cur = iter.next(), o = {}, value = null, cases = null, caseInfo = null, key = null; | ||
let cur = iter.next(), o = {}, casesCache = null; | ||
while (!cur.done) { | ||
value = cur.value; | ||
let value = cur.value; | ||
if (Array.isArray(value)) { | ||
@@ -268,7 +268,13 @@ o[value[0]] = value[1]; | ||
else { | ||
if (cases == null && typeof value[FSymbol.reflection] === "function") { | ||
cases = value[FSymbol.reflection]().cases; | ||
casesCache = casesCache || new Map(); | ||
let proto = Object.getPrototypeOf(value); | ||
let cases = casesCache.get(proto), caseInfo = null; | ||
if (cases == null) { | ||
if (typeof proto[FSymbol.reflection] === "function") { | ||
cases = proto[FSymbol.reflection]().cases; | ||
casesCache.set(proto, cases); | ||
} | ||
} | ||
if (cases != null && Array.isArray(caseInfo = cases[value.tag])) { | ||
key = caseInfo[0]; | ||
let key = caseInfo[0]; | ||
if (caseRule === CaseRules.LowerFirst) { | ||
@@ -275,0 +281,0 @@ key = key[0].toLowerCase() + key.substr(1); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
229331
7249
0