Commits

trikitrok committed 52539ba Draft

Better name for constant, I think...

Comments (0)

Files changed (1)

src/ExtractClass.js

 function DNI(characters) {
 
 	this.validate = function(characters) {
-	  var BAD_DNI = 'bad DNI';
+	  var BAD_DNI_MESSAGE = 'bad DNI';
 	  var nifCharacter = characters[characters.length - 1];
 		if (nifCharacter !== 'a') {
-		  throw BAD_DNI;
+		  throw BAD_DNI_MESSAGE;
 		}
 	};