id
Defines the identify property.
set.props.id(prop)
Defines the property name on items that uniquely identifies them. This is the default sorted property if no sort is provided.
var algebra = new set.Algebra(set.props.id("_id"));
algebra.index(
{sortBy: "name desc"},
[{name: "Meyer"}],
{name: "Adams"}) //-> 1
algebra.index(
{sortBy: "name"},
[{name: "Meyer"}],
{name: "Adams"}) //-> 0
Parameters
- prop
{String}
:The property name that defines the unique property id.