UNPKG

functionalscript

Version:

FunctionalScript is a purely functional subset of JavaScript

24 lines (23 loc) 737 B
/** * Utility functions for working with strings and lists of strings. * * @module * * @example * * ```js * import { join, concat, repeat, cmp } from './module.f.ts' * * const words = ['hello', 'world'] * join(' ')(words) // 'hello world' * concat(words) // 'helloworld' * repeat('abc')(3) // 'abcabcabc' * cmp('apple')('banana') // -1 * ``` */ import { type List } from '../list/module.f.ts'; import { type Sign } from '../function/compare/module.f.ts'; export declare const join: (_: string) => (input: List<string>) => string; export declare const concat: (input: List<string>) => string; export declare const repeat: (n: string) => (v: number) => string; export declare const cmp: (a: string) => (b: string) => Sign;