dart_node_core library

Core JS interop utilities for Dart JS Framework

Classes

Process

A spawned child process with typed streams.

Extensions

NullableExtensions on T?

Extension methods FP style transformations

ObjectExtensions on T

Extension methods FP style transformations

Constants

defaultRetryPolicy → const ({double backoffMultiplier, int baseDelayMs, int maxAttempts})

Default retry policy: 3 attempts, 50ms base, 2x backoff.

Properties

console JSObject

Get the console object
no setter

require JSFunction

Get Node's require function
no setter

Functions

consoleError(String message) → void

Log to console.error (stderr)

consoleLog(String message) → void

Log to console (stdout)

getGlobal(String name) JSAny?

Get a value from the global JavaScript context

requireModule(String module) JSAny

Require a Node module

spawn(String command, List<String> args, {bool shell = false}) Process

Spawn a child process.

withRetry<T>(RetryPolicy policy, bool isRetryable(String error), Result<T, String> operation(), {void onRetry(int attempt, String error, int delayMs)?}) Result<T, String>

Execute operation with retry on transient errors.

Typedefs

RetryPolicy = ({double backoffMultiplier, int baseDelayMs, int maxAttempts})
Retry policy configuration.