MCPcopy Create free account
hub / github.com/Effect-TS/effect / initNonEmpty

Function initNonEmpty

packages/effect/src/Array.ts:1329–1329  ·  view source on GitHub ↗
(self: NonEmptyReadonlyArray<A>)

Source from the content-addressed store, hash-verified

1327 * @since 2.0.0
1328 */
1329export const initNonEmpty = <A>(self: NonEmptyReadonlyArray<A>): Array<A> => self.slice(0, -1)
1330
1331const clampCount = (n: number, length: number): number => Math.min(Count.normalize(n), length)
1332

Callers 3

Array.tsFile · 0.85
unappendFunction · 0.85
initFunction · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected