UNPKG

@tsdotnet/linq

Version:

A familiar set of functions that operate on JavaScript iterables (ES2015+) in a similar way to .NET's LINQ does with enumerables.

15 lines (12 loc) 370 B
import { compare } from '@tsdotnet/compare'; import toArray from '../resolutions/toArray.js'; function descending(sequence) { return { *[Symbol.iterator]() { for (const e of toArray(sequence).sort(compare.primitives.inverted)) yield e; } }; } export { descending as default }; //# sourceMappingURL=descending.js.map