aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-28 21:39:10 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-28 21:39:10 +0800
commit2544d2c952dc003d62bdb99a554b3fa576b202c5 (patch)
tree8af0e15b3b26b3a107a32d6a406054c0614a1e52 /lib
parentea7c2fc673db31f96583e4712aa0fb78f5d709eb (diff)
downloadgo-tangerine-2544d2c952dc003d62bdb99a554b3fa576b202c5.tar
go-tangerine-2544d2c952dc003d62bdb99a554b3fa576b202c5.tar.gz
go-tangerine-2544d2c952dc003d62bdb99a554b3fa576b202c5.tar.bz2
go-tangerine-2544d2c952dc003d62bdb99a554b3fa576b202c5.tar.lz
go-tangerine-2544d2c952dc003d62bdb99a554b3fa576b202c5.tar.xz
go-tangerine-2544d2c952dc003d62bdb99a554b3fa576b202c5.tar.zst
go-tangerine-2544d2c952dc003d62bdb99a554b3fa576b202c5.zip
tests for abi.filters
Diffstat (limited to 'lib')
-rw-r--r--lib/abi.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/abi.js b/lib/abi.js
index a0752647f..a0c862593 100644
--- a/lib/abi.js
+++ b/lib/abi.js
@@ -73,6 +73,14 @@ var filterFunctions = function (json) {
});
};
+/// Filters all events form input abi
+/// @returns abi array with filtered objects of type 'event'
+var filterEvents = function (json) {
+ return json.filter(function (current) {
+ return current.type === 'event';
+ });
+};
+
/// @param string string to be padded
/// @param number of characters that result string should have
/// @param sign, by default 0
@@ -414,6 +422,7 @@ module.exports = {
methodDisplayName: methodDisplayName,
methodTypeName: methodTypeName,
getMethodWithName: getMethodWithName,
- filterFunctions: filterFunctions
+ filterFunctions: filterFunctions,
+ filterEvents: filterEvents
};