Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/esm/array/index.js>includesSlice

A JavaScript extension package for building strong and modern applications.
Latest
function includesSlice
import { includesSlice } from "https://deno.land/x/ayonli_jsext@v0.9.72/esm/array/index.js";

Checks if the array contains another array as a slice of its contents.

Examples

Example 1

import { includesSlice } from "@ayonli/jsext/array";

const arr = [1, 2, 3, 4, 5];

console.log(includesSlice(arr, [2, 3, 4])); // true
console.log(includesSlice(arr, [2, 4, 3])); // false

Parameters

arr
slice