Skip to main content
Module

x/core_fn/uncurry/common/mod.ts>slice

A collection of built-in object method and property as currying function
Latest
variable slice
import { slice } from "https://deno.land/x/core_fn@v1.0.0-beta.16/uncurry/common/mod.ts";

Returns a section of a value.

Examples

Example 1

slice(0, 2, 'hello') // 'he'
slice(1, Infinity, [1, 2, 3]) // [2, 3]

type

<T extends
| string
| readonly unknown[]
| TypedArray
| ArrayBuffer
| SharedArrayBuffer
| Blob
>
(
start: number | undefined,
end: number | undefined,
val: T,
) => T