positioned-comparative-selection
v2.1.0
Published
Uses an existing ranking of items to try and position new ("to rank") items as fast as possible.
Downloads
2
Readme
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 itemranked
boolean whether the item needs ranking or notmiddle
boolean whether the item belongs to the middle range or notability
number? ability (ornull
)se
number? standard error (ornull
)
Comparison
Type: object
Properties
a
string ID of the A itemb
string ID of the B itemselected
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 itemminReliability
number minimum reliability necessary forranked:false
items
Notification
Type: object
Properties
select
Parameters
payload
object full payload objectpayload.items
Array<Item> list of itemspayload.options
Options optionspayload.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