Ejemplo n.º 1
0
it("should support a user-defined type guard", () => {
  const o = of("foo").pipe(find((s: "foo") => true));
});
Ejemplo n.º 2
0
it("should support a predicate that takes an index and the source", () => {
  const o = of("foo").pipe(find((s, index, source) => true));
});
Ejemplo n.º 3
0
it("should support a predicate that takes an index", () => {
  const o = of("foo").pipe(find((s, index) => true));
});
Ejemplo n.º 4
0
it("should support a predicate", () => {
  const o = of("foo").pipe(find(s => true));
});
Ejemplo n.º 5
0
it("should support a user-defined type guard that takes an index and the source", () => {
  const o = of("foo").pipe(find((s: "foo", index, source) => true));
});
Ejemplo n.º 6
0
export function find(predicate, thisArg) {
    return higherOrder(predicate, thisArg)(this);
}