rtap
v1.0.1
Published
A javascript implementation of Ruby's #tap
Downloads
4
Readme
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";
})