From 12587bb5a0030b8b38246357bc3b94c8b7310d4a Mon Sep 17 00:00:00 2001 From: thosakwe Date: Sat, 11 Mar 2017 02:13:57 -0500 Subject: [PATCH] transform hook --- lib/hooks.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/hooks.dart b/lib/hooks.dart index c1013952..691a8a31 100644 --- a/lib/hooks.dart +++ b/lib/hooks.dart @@ -47,6 +47,10 @@ HookedServiceEventListener toJson() { }; } +/// Mutates `e.data` or `e.result` using the given [transformer]. +HookedServiceEventListener transform(transformer(obj)) { +} + /// Transforms `e.data` or `e.result` into an instance of the given [type], /// if it is not already. HookedServiceEventListener toType(Type type) {