Skip to content

Instantly share code, notes, and snippets.

@OliverJAsh

OliverJAsh/foo.ts

Created May 5, 2020
Embed
What would you like to do?
import { from } from 'ix/iterable';
import { map } from 'ix/iterable/operators';
const compare = (a: string, b: string) =>
from(a).pipe(map((value, index) => value === b[index]));
for (const v of compare('yes', 'yas')) {
console.log(v);
}
// true
// false
// true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.