mirror of
https://github.com/antonmedv/fx
synced 2024-11-05 12:00:46 +00:00
Prevent "reduce" name collision (#177)
This commit is contained in:
parent
e14e56fa06
commit
8a9e1f39d5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user