diff --git a/README.md b/README.md index ccc5e78..53db5ef 100644 --- a/README.md +++ b/README.md @@ -41,11 +41,12 @@ The follow options may also be specified: // 4. check the most recent character, if desired // 5. normalize the input if desired (i.e. John.Doe@GMail.com -> john.doe@gmail.com) + // (or return something else entirely) // You can error out // return form.PromiseA.reject(new Error("[X] This isn't an email address: no '@'")); - return input.toLowerCase(); + return input.toLowerCase(); // will be returned as `result` alongside `input` } diff --git a/index.js b/index.js index c934b4d..097abf0 100644 --- a/index.js +++ b/index.js @@ -233,7 +233,7 @@ var form = { var input = ws._input.join(''); ws._input = []; ws._inputIndex = 0; - resolve({ input: normalInput || input }); + resolve({ input: input, result: normalInput }); }, function (err) { rrs.on('data', onData);