mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 12:41:54 +03:00
bbaf619f63
swc_bundler: - [x] Fix wrapped esms. (denoland/deno#9307) - [x] Make test secure.
16 lines
442 B
TypeScript
16 lines
442 B
TypeScript
// Loaded from https://deno.land/x/ramda@v0.27.2/source/internal/_xwrap.js
|
|
|
|
|
|
function XWrap(fn) {
|
|
this.f = fn;
|
|
}
|
|
XWrap.prototype['@@transducer/init'] = function() {
|
|
throw new Error('init not implemented on XWrap');
|
|
};
|
|
XWrap.prototype['@@transducer/result'] = function(acc) { return acc; };
|
|
XWrap.prototype['@@transducer/step'] = function(acc, x) {
|
|
return this.f(acc, x);
|
|
};
|
|
|
|
export default function _xwrap(fn) { return new XWrap(fn); }
|