-
Notifications
You must be signed in to change notification settings - Fork 0
INQTest.js.setCharacteristic.js
kyleady edited this page Jan 30, 2018
·
2 revisions
Determines which Characteristic a user intends to test against. Users should not be expected to get spacing, dashes, capitalization, and alternate names perfectly right. This method tries to account for similar inputs.
user_input is a string. That string is compared each option in the INQTest.js.characteristics.js array. This is done so by converting each of the options into a RegExp through toRegex.js.
If a match is found, the proper name for the Characteristic will be saved to this.Characteristic, it will save if it is a Party Stat to this.PartyStat, and the method will return true.
If no match is found, the method will return false.