Comparing version 1.0.0 to 1.0.1
@@ -18,2 +18,4 @@ "use strict"; | ||
function contextComposer() { | ||
var _this = this; | ||
var opts = this; | ||
@@ -53,2 +55,33 @@ return { | ||
})), | ||
setOps: function setOps() { | ||
for (var _len = arguments.length, ops = new Array(_len), _key = 0; _key < _len; _key++) { | ||
ops[_key] = arguments[_key]; | ||
} | ||
for (var _i = 0; _i < ops.length; _i++) { | ||
var op = ops[_i]; | ||
(0, _op.opBase)({ | ||
op: op, | ||
options: opts | ||
}); | ||
} | ||
return _this; | ||
}, | ||
setSyncOps: function setSyncOps() { | ||
for (var _len2 = arguments.length, ops = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
ops[_key2] = arguments[_key2]; | ||
} | ||
for (var _i2 = 0; _i2 < ops.length; _i2++) { | ||
var op = ops[_i2]; | ||
(0, _op.opBase)({ | ||
op: op, | ||
options: opts, | ||
sync: true | ||
}); | ||
} | ||
return _this; | ||
}, | ||
withOp: function withOp(op) { | ||
@@ -55,0 +88,0 @@ (0, _op.opBase)({ |
@@ -54,2 +54,16 @@ import { opBase } from "./op" | ||
setOps: (...ops) => { | ||
for (const op of ops) { | ||
opBase({ op, options: opts }) | ||
} | ||
return this | ||
}, | ||
setSyncOps: (...ops) => { | ||
for (const op of ops) { | ||
opBase({ op, options: opts, sync: true }) | ||
} | ||
return this | ||
}, | ||
withOp: op => { | ||
@@ -56,0 +70,0 @@ opBase({ op, options: opts }) |
@@ -15,3 +15,3 @@ { | ||
], | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Build beautiful and extensible eventing APIs", | ||
@@ -18,0 +18,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
110655
2045