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) 358 B
import { compare } from '@tsdotnet/compare'; import toArray from '../resolutions/toArray.js'; function ascending(sequence) { return { *[Symbol.iterator]() { for (const e of toArray(sequence).sort(compare.primitives)) yield e; } }; } export { ascending as default }; //# sourceMappingURL=ascending.js.map