Page Contents

Home > @loopback/context > BindingComparator

BindingComparator interface

Compare function to sort an array of bindings. It is used by Array.prototype.sort().

Signature:

export interface BindingComparator 

Example

const compareByKey: BindingComparator = (a, b) => a.key.localeCompare(b.key);