Prevent "reduce" name collision (#177)

This commit is contained in:
Yury Shulaev 2022-01-02 09:44:25 +03:00 committed by GitHub
parent e14e56fa06
commit 8a9e1f39d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
'use strict'
const JSON = require('lossless-json') // override JSON for user's code
function reduce(json, code) {
module.exports = function (json, code) {
if (process.env.FX_APPLY) {
return global[process.env.FX_APPLY](code)(json)
}
@ -47,5 +47,3 @@ function reduce(json, code) {
}
return fn
}
module.exports = reduce