diff --git a/package.json b/package.json index 78ec709..1c6f35e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "paravel", - "version": "0.4.9", + "version": "0.4.10", "description": "Yet another toolkit for nostr", "author": "hodlbod", "license": "MIT", diff --git a/src/util/nostr.ts b/src/util/nostr.ts index 7ee419b..d2c4f8c 100644 --- a/src/util/nostr.ts +++ b/src/util/nostr.ts @@ -120,6 +120,8 @@ export class Fluent { map = (f: (t: T) => U) => new Fluent(this.xs.map(f)) + flatMap = (f: (t: T) => U) => new Fluent(this.xs.flatMap(f)) + pluck = (k: number | string) => new Fluent(this.xs.map(x => x[k])) filter = (f: (t: T) => boolean) => new Fluent(this.xs.filter(f))