Module

x/rambda/mod.ts>splitAt

Faster and smaller alternative to Ramda
Go to Latest
function splitAt
import { splitAt } from "https://dotland.deno.dev/x/rambda@v9.2.0/mod.ts";

It splits string or array at a given index.

Parameters

index: number
input: T[]

Returns

[T[], T[]]

Parameters

index: number
input: string

Returns

[string, string]

Parameters

index: number

Returns

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