Update lib/composer.js

fix bugs: when maxLength is 0 or -1, ignore it and do not compare with length