Add some tag utils

This commit is contained in:
Jon Staab
2024-04-09 10:52:19 -07:00
parent 17da310748
commit b0e40e8177
6 changed files with 28 additions and 15 deletions
+4
View File
@@ -47,6 +47,10 @@ export class Fluent<T> {
reject = (f: (t: T) => boolean) => this.clone(this.xs.filter(t => !f(t)))
keep = (xs: T[]) => this.filter(x => xs.includes(x))
without = (xs: T[]) => this.reject(x => xs.includes(x))
map = (f: (t: T) => T) => this.clone(this.xs.map(f))
mapTo = <U>(f: (t: T) => U) => Fluent.from(this.xs.map(f))
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@coracle.social/lib",
"version": "0.0.4",
"version": "0.0.5",
"author": "hodlbod",
"license": "MIT",
"description": "A collection of utilities.",