Skip to content

Commit 56d087d

Browse files
committed
avoid generation of intermediate array (#598)
1 parent fd84f48 commit 56d087d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,6 @@ function build (schema, options) {
161161
}
162162
}
163163

164-
const dependenciesName = ['validator', 'serializer', contextFunctionCode]
165-
166164
if (options.debugMode) {
167165
options.mode = 'debug'
168166
}
@@ -171,7 +169,7 @@ function build (schema, options) {
171169
return {
172170
validator,
173171
serializer,
174-
code: dependenciesName.join('\n'),
172+
code: `validator\nserializer\n${contextFunctionCode}`,
175173
ajv: validator.ajv
176174
}
177175
}

0 commit comments

Comments
 (0)