@muxiu1997/let-also
v0.1.0-beta.20240819
Published
A tiny library inspired by Kotlin, designed for call chaining in JavaScript / TypeScript.
Downloads
6
Maintainers
Readme
Install
$ npm install @muxiu1997/let-also
Quick Start
import { wrap } from '@muxiu1997/let-also'
const result = wrap(Math.random() * 100)
.also(it => console.log(`Random number: ${it}`))
.takeIf(it => it > 50)
?.let(it => it * 2)