1.0.1 • Published 7 months ago

rtap v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

rtap

An implementation of Rubys #tap for TypeScript

Usage

Use on any object:

import { tap } from "rtap";

const user: User = tap(new User(), (u: User) => {
  u.name = "Foo";
});

Added as a mixin to a class:

import { tappify } from "rtap";

const User = tappify(BaseUser);

const user = new User().tap((u: User) => {
  u.name = "Foo";
})
1.0.1

7 months ago

1.0.0

7 months ago

0.0.1

7 months ago