tests for abi.filters
This commit is contained in:
11
lib/abi.js
11
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
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user