Returns first n children of an array
n
Example:
import { limit } from "@thalesrc/js-utils/array"; const array = ["a", "b", "c", "d", "e", "f"]; limit(array, 3); // ["a", "b", "c"]
Prototype Example:
import "@thalesrc/js-utils/array/proto/limit"; const array = ["a", "b", "c", "d", "e", "f"]; array.limit(3); // ["a", "b", "c"]
Limiter
New array
Generated using TypeDoc
Limit
Returns first
n
children of an arrayExample:
import { limit } from "@thalesrc/js-utils/array"; const array = ["a", "b", "c", "d", "e", "f"]; limit(array, 3); // ["a", "b", "c"]
Prototype Example:
import "@thalesrc/js-utils/array/proto/limit"; const array = ["a", "b", "c", "d", "e", "f"]; array.limit(3); // ["a", "b", "c"]