Skip to main content

Built and signed on GitHub Actions

This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Bun, Cloudflare Workers
JSR Score
88%
Published
2 months ago (0.1.0)
function Do

Initiates an extended method chain.

Examples

Example 1

  const result = Do(42)
    .pipe((it) => it + 1) // Equivalent to: |> % + 1
    .pipe((it) => it * 2) // Equivalent to: |> % * 2
    .done();
  console.log(result); // => 86

Type Parameters

Parameters

value: T

the leftmost expression of the chain

Return Type

the method chain builder

Add Package

deno add @qnighy/metaflow

Import symbol

import { Do } from "@qnighy/metaflow/do";

Add Package

npx jsr add @qnighy/metaflow

Import symbol

import { Do } from "@qnighy/metaflow/do";

Add Package

yarn dlx jsr add @qnighy/metaflow

Import symbol

import { Do } from "@qnighy/metaflow/do";

Add Package

pnpm dlx jsr add @qnighy/metaflow

Import symbol

import { Do } from "@qnighy/metaflow/do";

Add Package

bunx jsr add @qnighy/metaflow

Import symbol

import { Do } from "@qnighy/metaflow/do";