Skip to content

Function.split

github-actions[bot] edited this page Nov 18, 2026 · 4 revisions

umt / split

Function: split()

split(separator, limit?): (value) => string[]

Defined in: Pipe/split.ts:11

Creates a pipe operator that splits a string into an array of substrings

Parameters

separator

string | RegExp

The pattern describing where each split occurs

limit?

number

The maximum number of substrings to return

Returns

An operator that returns the substrings

(value) => string[]

Example

pipe("a,b,c", split(",")); // ["a", "b", "c"]
pipe("a,b,c", split(",", 2)); // ["a", "b"]

API

Classes

Interfaces

Type Aliases

Variables

Functions

Clone this wiki locally