UNPKG

r3bl-ts-utils

Version:

The `r3bl-ts-utils` package is a set of useful TypeScript functions and classes that can be used in Node.js and browser environments. They are inspired by Kotlin stdlib, and Rust to write code as expressions rather than statements, colorized text, powerfu

23 lines (21 loc) 876 B
import { FigureSet } from "./types"; /** This is the main object that is used by consumers of this library. */ export declare const figures: FigureSet; /** On terminals which do not support Unicode symbols, substitute them to other symbols. Replace Unicode symbols depending on the terminal. @param string - String where the Unicode symbols will be replaced with fallback symbols depending on the terminal. @returns The input with replaced fallback Unicode symbols. @example ``` import figures, {replaceSymbols} from 'figures'; console.log(replaceSymbols('✔︎ check')); // On terminals with Unicode symbols: ✔︎ check // On other terminals: √ check console.log(figures.tick); // On terminals with Unicode symbols: ✔︎ // On other terminals: √ ``` */ export declare function replaceSymbols(arg: string): string;