Array 过滤器
小于 1 分钟
Array 过滤器
模块
类型
interface Array<T> {
filterReject(callbackfn: (value: t, index: number, target: Array<T>) => boolean, thisArg?: any): Array<T>;
}
interface {
filterReject(callbackfn: (value: number, index: number, target: ) => boolean, thisArg?: any): ;
}
入口点
core-js/proposals/array-filtering-stage-1
core-js(-pure)/full/array(/virtual)/filter-reject
core-js/full/typed-array/filter-reject
示例
示例:
[1, 2, 3, 4, 5].filterReject((it) => it % 2); // => [2, 4]