-
Notifications
You must be signed in to change notification settings - Fork 0
drop
김태헌 edited this page Sep 26, 2024
·
7 revisions
import { drop } from 'mori-ts';
const result = [...drop(2, [1, 2, 3, 4, 5])];
console.log(result); // 출력: [3, 4, 5]
import { drop } from 'mori-ts';
const result = [...drop(2, 'hello')];
console.log(result); // 출력: ['l', 'l', 'o']
import { pipe, toArray, drop, toAsync } from 'mori-ts';
const result = pipe(
[1, 2, 3, 4, 5],
drop(2),
toArray,
);
console.log(result); // 출력: [3, 4, 5]
const result = await pipe(
toAsync,
[1, 2, 3, 4, 5],
drop(2),
toArray,
);
console.log(result); // 출력: [3, 4, 5]
https://github.com/gangnamssal/mori-ts/blob/main/src/test/drop.spec.ts