fast-json-stringify
Advanced tools
Comparing version 2.7.10 to 2.7.11
15
index.js
@@ -50,3 +50,6 @@ 'use strict' | ||
const referenceSerializersMap = new Map() | ||
function build (schema, options) { | ||
referenceSerializersMap.clear() | ||
options = options || {} | ||
@@ -148,2 +151,4 @@ isValidSchema(schema) | ||
referenceSerializersMap.clear() | ||
return (Function.apply(null, dependenciesName).apply(null, dependencies)) | ||
@@ -974,4 +979,14 @@ } | ||
} | ||
location = refFinder(schema.items.$ref, location) | ||
schema.items = location.schema | ||
if (referenceSerializersMap.has(schema.items)) { | ||
code += ` | ||
return ${referenceSerializersMap.get(schema.items)}(obj) | ||
} | ||
` | ||
return code | ||
} | ||
referenceSerializersMap.set(schema.items, name) | ||
} | ||
@@ -978,0 +993,0 @@ |
{ | ||
"name": "fast-json-stringify", | ||
"version": "2.7.10", | ||
"version": "2.7.11", | ||
"description": "Stringify your JSON at max speed", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
344636
66
10373
1