All files / web3-eth-abi/src/types string.js

100% Statements 12/12
100% Branches 0/0
100% Functions 3/3
100% Lines 12/12
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 211x 1x   1x 1x 1x     1x 1x   1x 439x     1x 71x     1x  
var f = require('../formatters');
var SolidityType = require('../type');
 
var SolidityTypeString = function () {
    this._inputFormatter = f.formatInputString;
    this._outputFormatter = f.formatOutputString;
};
 
SolidityTypeString.prototype = new SolidityType({});
SolidityTypeString.prototype.constructor = SolidityTypeString;
 
SolidityTypeString.prototype.isType = function (name) {
    return !!name.match(/^string(\[([0-9]*)\])*$/);
};
 
SolidityTypeString.prototype.isDynamicType = function () {
    return true;
};
 
module.exports = SolidityTypeString;