@opencreek/ext
Advanced tools
Comparing version 2.4.0 to 2.5.0--canary.30.6036915490.0
@@ -43,2 +43,6 @@ type PairSplit<T> = T extends [infer F, infer L] ? [Chain<F>, Chain<L>] : never; | ||
distinctBy<D>(selector: (el: T) => D): Chain<T>; | ||
drop(num: number): Chain<T>; | ||
dropLast(num: number): Chain<T>; | ||
take(num: number): Chain<T>; | ||
takeLast(num: number): Chain<T>; | ||
dropLastWhile(predicate: (el: T) => boolean): Chain<T>; | ||
@@ -45,0 +49,0 @@ dropWhile(predicate: (el: T) => boolean): Chain<T>; |
@@ -143,2 +143,14 @@ "use strict"; | ||
} | ||
drop(num) { | ||
return new Chain(this.val.slice(num)); | ||
} | ||
dropLast(num) { | ||
return new Chain(this.val.slice(0, -num)); | ||
} | ||
take(num) { | ||
return new Chain(this.val.slice(0, num)); | ||
} | ||
takeLast(num) { | ||
return new Chain(this.val.slice(-num)); | ||
} | ||
dropLastWhile(predicate) { | ||
@@ -145,0 +157,0 @@ const dropped = (0, deno_std_collections_1.dropLastWhile)(this.val, predicate); |
{ | ||
"name": "@opencreek/ext", | ||
"version": "2.4.0", | ||
"version": "2.5.0--canary.30.6036915490.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -236,2 +236,18 @@ import { | ||
drop(num: number): Chain<T> { | ||
return new Chain(this.val.slice(num)) | ||
} | ||
dropLast(num: number): Chain<T> { | ||
return new Chain(this.val.slice(0, -num)) | ||
} | ||
take(num: number): Chain<T> { | ||
return new Chain(this.val.slice(0, num)) | ||
} | ||
takeLast(num: number): Chain<T> { | ||
return new Chain(this.val.slice(-num)) | ||
} | ||
dropLastWhile(predicate: (el: T) => boolean): Chain<T> { | ||
@@ -238,0 +254,0 @@ const dropped = dropLastWhile(this.val, predicate) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134203
2350
2