Skip to content

samboylett/rtap

Repository files navigation

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";
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published