1.0.1 • Published 2 years ago

rtap v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years 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

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago