|
1 | 1 | import { Dict } from '@jupyter-widgets/base';
|
2 | 2 |
|
3 |
| -import { filter } from '@lumino/algorithm'; |
4 |
| - |
5 | 3 | import { Transform } from './transform';
|
6 | 4 | import { DataSource } from '../datasource';
|
7 | 5 |
|
@@ -186,7 +184,7 @@ export class FilterExecutor extends TransformExecutor {
|
186 | 184 | }
|
187 | 185 |
|
188 | 186 | const data: Dict<any[]> = {};
|
189 |
| - const indices = Array.from(filter(Array(input.length).keys(), filterFunc)); |
| 187 | + const indices = Array.from(Array(input.length).keys()).filter(filterFunc); |
190 | 188 |
|
191 | 189 | // There is a better approach for this
|
192 | 190 | // We don't need to copy the data
|
@@ -286,17 +284,16 @@ export class SortExecutor extends TransformExecutor {
|
286 | 284 | );
|
287 | 285 | };
|
288 | 286 |
|
289 |
| - const nanIndices = Array.from( |
290 |
| - filter(Array(input.length).keys(), (idx: number) => { |
| 287 | + const nanIndices = Array.from(Array(input.length).keys()).filter( |
| 288 | + (idx: number) => { |
291 | 289 | return isNaNorNull(input.data[field][idx]);
|
292 |
| - }), |
| 290 | + }, |
293 | 291 | );
|
294 |
| - const nonNanIndices = Array.from( |
295 |
| - filter(Array(input.length).keys(), (idx: number) => { |
| 292 | + const nonNanIndices = Array.from(Array(input.length).keys()).filter( |
| 293 | + (idx: number) => { |
296 | 294 | return !isNaNorNull(input.data[field][idx]);
|
297 |
| - }), |
| 295 | + }, |
298 | 296 | );
|
299 |
| - |
300 | 297 | if (columnDataType == 'string') {
|
301 | 298 | if (this._options.desc) {
|
302 | 299 | sortFunc = (a: number, b: number): number => {
|
|
0 commit comments