return result with input, if prescribed
Cette révision appartient à :
Parent
22e0c904e0
révision
66d46eab32
@ -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`
|
||||
}
|
||||
|
||||
|
||||
|
2
index.js
2
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);
|
||||
|
||||
|
Chargement…
x
Référencer dans un nouveau ticket
Bloquer un utilisateur