positioned-comparative-selection
Uses an existing ranking of items to try and position new ("to rank") items as fast as possible.
API
Item
Type: object
Properties
-
id
string ID of the item -
ranked
boolean whether the item needs ranking or not -
middle
boolean whether the item belongs to the middle range or not -
ability
number? ability (ornull
) -
se
number? standard error (ornull
)
Comparison
Type: object
Properties
-
a
string ID of the A item -
b
string ID of the B item -
selected
string? The ID of the selected item (i.e. either the value ofa
orb
, Ornull
)
Options
Type: object
Properties
-
maxComparisonsPerItem
number maximum number of comparisons per item -
minReliability
number minimum reliability necessary forranked:false
items
Notification
Type: object
Properties
select
Parameters
-
payload
object full payload object-
payload.items
Array<Item> list of items -
payload.options
Options options -
payload.comparisons
Array<Comparison>? list of comparisons
-
Returns (Comparison | Notification) The result of the selection
Development
- Testing framework: https://mochajs.org/
- Assertion library: https://github.com/moll/js-must
- Test spies and stubs: http://sinonjs.org/
- Override dependencies: https://github.com/thlorenz/proxyquire
Testing
$ npm test
Linting
$ npm lint
License
Proprietary License © 2016, d-pac