mirror of
https://github.com/antonmedv/fx.git
synced 2024-09-11 10:15:29 +03:00
Prevent "reduce" name collision (#177)
This commit is contained in:
parent
e14e56fa06
commit
8a9e1f39d5
@ -1,7 +1,7 @@
|
|||||||
'use strict'
|
'use strict'
|
||||||
const JSON = require('lossless-json') // override JSON for user's code
|
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) {
|
if (process.env.FX_APPLY) {
|
||||||
return global[process.env.FX_APPLY](code)(json)
|
return global[process.env.FX_APPLY](code)(json)
|
||||||
}
|
}
|
||||||
@ -47,5 +47,3 @@ function reduce(json, code) {
|
|||||||
}
|
}
|
||||||
return fn
|
return fn
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = reduce
|
|
||||||
|
Loading…
Reference in New Issue
Block a user