Skip to main content
Module

x/code_block_writer/mod.ts>default#iterateLastChars

Code writer for JavaScript and TypeScript code.
Go to Latest
method default.prototype.iterateLastChars
import { default } from "https://deno.land/x/code_block_writer@11.0.0/mod.ts";

Iterates over the writer characters in reverse order. The iteration stops when a non-null or undefined value is returned from the action. The returned value is then returned by the method.

Parameters

action: (char: string, index: number) => T | undefined

Returns

T | undefined