Comparing version 0.0.14 to 0.0.15
@@ -21,2 +21,3 @@ "use strict"; | ||
exports.some = some; | ||
exports.sort = sort; | ||
exports.toArray = toArray; | ||
@@ -87,2 +88,6 @@ class Seq { | ||
sort(fn) { | ||
return new Seq(sort(this.seq, fn)); | ||
} | ||
slice(begin, end) { | ||
@@ -263,2 +268,11 @@ return new Seq(slice(this.seq, begin, end)); | ||
function sort(seq, fn) { | ||
return function* () { | ||
const all = toArray(seq).sort(fn); | ||
for (const item of all) { | ||
yield item; | ||
} | ||
}; | ||
} | ||
function toArray(seq) { | ||
@@ -265,0 +279,0 @@ const results = []; |
{ | ||
"name": "lazily", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"author": "Jeswin<jeswinpk@agilehead.com>", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
87768
242