fixed .forEach return

This commit is contained in:
Philipp Kunz 2016-11-25 11:19:12 +01:00
parent 8b891c74e4
commit 54d8ef2576
3 changed files with 10 additions and 10 deletions

6
dist/index.d.ts vendored
View File

@ -6,7 +6,7 @@ export interface IPromiseFunction {
(file?: any, enc?: any): PromiseLike<any>;
}
declare let defaultExport: (functionsToExecuteArg: IPromiseFunction | IPromiseFunction[], executionModeArg?: TExecutionMode) => Transform;
export declare let forEach: (funcArg: IPromiseFunction) => void;
export declare let forFirst: (funcArg: IPromiseFunction) => void;
export declare let atEnd: (funcArg: IPromiseFunction) => void;
export declare let forEach: (funcArg: IPromiseFunction) => Transform;
export declare let forFirst: (funcArg: IPromiseFunction) => Transform;
export declare let atEnd: (funcArg: IPromiseFunction) => Transform;
export default defaultExport;

8
dist/index.js vendored
View File

@ -64,14 +64,14 @@ let defaultExport = (functionsToExecuteArg, executionModeArg = 'forEach') => {
return through2.obj(forEach, atEnd);
};
exports.forEach = (funcArg) => {
defaultExport(funcArg, 'forEach');
return defaultExport(funcArg, 'forEach');
};
exports.forFirst = (funcArg) => {
defaultExport(funcArg, 'forFirst');
return defaultExport(funcArg, 'forFirst');
};
exports.atEnd = (funcArg) => {
defaultExport(funcArg, 'atEnd');
return defaultExport(funcArg, 'atEnd');
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = defaultExport;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLHVCQUFzQjtBQUN0QixxQ0FBb0M7QUFTcEMsSUFBSSxhQUFhLEdBQUcsQ0FDaEIscUJBQTRELEVBQzVELGdCQUFnQixHQUFtQixTQUFTO0lBRzVDLElBQUksWUFBWSxHQUFHLEVBQUUsQ0FBQTtJQUNyQixJQUFJLFdBQVcsR0F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UJBQW1CLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQztnQkFDakMsRUFBRSxFQUFFLENBQUE7WUFDUixDQUFDLENBQUMsQ0FBQTtRQUNOLENBQUM7UUFBQyxJQUFJLENBQUMsQ0FBQztZQUNKLEVBQUUsRUFBRSxDQUFBO1FBQ1IsQ0FBQztJQUNMLENBQUMsQ0FBQTtJQUNELE1BQU0sQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLE9BQU8sRUFBRSxLQUFLLENBQUMsQ0FBQTtBQUN2QyxDQUFDLENBQUE7QUFFVSxRQUFBLE9BQU8sR0FBRyxDQUFDLE9BQXlCO0lBQzNDLE1BQU0sQ0FBQyxhQUFhLENBQUMsT0FBTyxFQUFFLFNBQVMsQ0FBQyxDQUFBO0FBQzVDLENBQUMsQ0FBQTtBQUVVLFFBQUEsUUFBUSxHQUFHLENBQUMsT0FBeUI7SUFDNUMsTUFBTSxDQUFDLGFBQWEsQ0FBQyxPQUFPLEVBQUUsVUFBVSxDQUFDLENBQUE7QUFDN0MsQ0FBQyxDQUFBO0FBRVUsUUFBQSxLQUFLLEdBQUcsQ0FBQyxPQUF5QjtJQUN6QyxNQUFNLENBQUMsYUFBYSxDQUFDLE9BQU8sRUFBRSxPQUFPLENBQUMsQ0FBQTtBQUMxQyxDQUFDLENBQUE7O0FBRUQsa0JBQWUsYUFBYSxDQUFBIn0=

View File

@ -75,15 +75,15 @@ let defaultExport = (
}
export let forEach = (funcArg: IPromiseFunction) => {
defaultExport(funcArg, 'forEach')
return defaultExport(funcArg, 'forEach')
}
export let forFirst = (funcArg: IPromiseFunction) => {
defaultExport(funcArg, 'forFirst')
return defaultExport(funcArg, 'forFirst')
}
export let atEnd = (funcArg: IPromiseFunction) => {
defaultExport(funcArg, 'atEnd')
return defaultExport(funcArg, 'atEnd')
}
export default defaultExport