evangelist
Advanced tools
Comparing version 0.6.2 to 0.7.0
@@ -0,0 +0,0 @@ export declare class Evangelist { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Evangelist = (function () { | ||
function Evangelist() { | ||
class Evangelist { | ||
wrap(target, wrapper) { | ||
return function (...args) { | ||
return wrapper(...args, target); | ||
}; | ||
} | ||
Evangelist.prototype.wrap = function (target, wrapper) { | ||
return function () { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i] = arguments[_i]; | ||
} | ||
return wrapper.apply(void 0, args.concat([target])); | ||
}; | ||
}; | ||
Evangelist.prototype.pipe = function () { | ||
var funcs = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
funcs[_i] = arguments[_i]; | ||
} | ||
pipe(...funcs) { | ||
return funcs.reduce(function (previousValue, currentValue) { | ||
return function () { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i] = arguments[_i]; | ||
} | ||
return currentValue(previousValue.apply(void 0, args)); | ||
return function (...args) { | ||
return currentValue(previousValue(...args)); | ||
}; | ||
}); | ||
}; | ||
return Evangelist; | ||
}()); | ||
} | ||
} | ||
exports.Evangelist = Evangelist; | ||
exports.default = Evangelist; | ||
//# sourceMappingURL=Evangelist.js.map |
import { Evangelist } from './Evangelist'; | ||
declare const evangelist: Evangelist; | ||
export = evangelist; |
"use strict"; | ||
var Evangelist_1 = require("./Evangelist"); | ||
var evangelist = new Evangelist_1.Evangelist(); | ||
const Evangelist_1 = require("./Evangelist"); | ||
const evangelist = new Evangelist_1.Evangelist(); | ||
module.exports = evangelist; | ||
//# sourceMappingURL=index.js.map |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "0.6.2", | ||
"version": "0.7.0", | ||
"homepage": "", | ||
@@ -45,6 +45,3 @@ "author": "Eser Ozvataf <eser@ozvataf.com>", | ||
], | ||
"bin": {}, | ||
"devDependencies": { | ||
"@types/es6-shim": "^0.31.34" | ||
} | ||
"bin": {} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
5661
30