Skip to main content
Module

x/rambda/immutable.d.ts>splitAt

Faster and smaller alternative to Ramda
Go to Latest
function splitAt
import { splitAt } from "https://deno.land/x/rambda@v7.0.1/immutable.d.ts";

It splits string or array at a given index.

Parameters

index: number
input: readonly T[]

Returns

readonly [readonly T[], readonly T[]]

Parameters

index: number
input: string

Returns

readonly [string, string]

Parameters

index: number

Returns

{ <T>(input: readonly T[]): readonly [readonly T[], readonly T[]]; (input: string): readonly [string, string]; }