Skip to content
Snippets Groups Projects
Commit aa4f3bb3 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

#33

parent 118c370f
No related branches found
No related tags found
No related merge requests found
...@@ -79,23 +79,18 @@ class Pipe extends Base { ...@@ -79,23 +79,18 @@ class Pipe extends Base {
* *
* @param {string} name * @param {string} name
* @param {function} callback * @param {function} callback
* @param {object} context
* @returns {Transformer} * @returns {Transformer}
* @throws {TypeError} value is not a string * @throws {TypeError} value is not a string
* @throws {TypeError} value is not a function * @throws {TypeError} value is not a function
*/ */
setCallback(name, callback) { setCallback(name, callback, context) {
for (const [, t] of Object.entries(this.pipe)) { for (const [, t] of Object.entries(this.pipe)) {
t.setCallback(name, callback); t.setCallback(name, callback, context);
} }
return this; return this;
// return this.pipe.reduce((accumulator, transformer, currentIndex, array) => {
// return transformer.setCallback(name,callback);
// }, value);
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment