File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
import test from 'ava' ;
2
2
3
- import { list , range , map } from '@aureooms/js-itertools' ;
3
+ import { list , range } from '@aureooms/js-itertools' ;
4
4
5
5
import { str } from './_fixtures.js' ;
6
6
7
- import { from , concat , iter } from '../../src/index.js' ;
7
+ import { from , concat , values } from '../../src/index.js' ;
8
8
9
9
function macro ( t , A , B ) {
10
10
const _A = from ( A ) ;
11
11
const _B = from ( B ) ;
12
12
const _C = concat ( _A , _B ) ;
13
13
14
14
const expected = [ ] . concat ( A ) . concat ( B ) ;
15
- const result = list ( map ( ( x ) => x . value , iter ( _C ) ) ) ;
15
+ const result = list ( values ( _C ) ) ;
16
16
t . deepEqual ( expected , result ) ;
17
17
}
18
18
Original file line number Diff line number Diff line change 1
1
import test from 'ava' ;
2
2
3
- import { list , range , map } from '@aureooms/js-itertools' ;
3
+ import { list , range } from '@aureooms/js-itertools' ;
4
4
5
5
import { str } from './_fixtures.js' ;
6
6
7
- import { from , pop , iter } from '../../src/index.js' ;
7
+ import { from , pop , values } from '../../src/index.js' ;
8
8
9
9
function throws ( t , array ) {
10
10
const node = from ( array ) ;
@@ -18,7 +18,7 @@ function macro(t, array) {
18
18
const node = from ( array ) ;
19
19
const [ after , last ] = pop ( node ) ;
20
20
t . is ( array [ array . length - 1 ] , last . value ) ;
21
- const result = list ( map ( ( x ) => x . value , iter ( after ) ) ) ;
21
+ const result = list ( values ( after ) ) ;
22
22
t . deepEqual ( array . slice ( 0 , - 1 ) , result ) ;
23
23
}
24
24
Original file line number Diff line number Diff line change 1
1
import test from 'ava' ;
2
2
3
- import { list , range , map } from '@aureooms/js-itertools' ;
3
+ import { list , range } from '@aureooms/js-itertools' ;
4
4
5
5
import { str } from './_fixtures.js' ;
6
6
7
- import { from , shift , iter } from '../../src/index.js' ;
7
+ import { from , shift , values } from '../../src/index.js' ;
8
8
9
9
function throws ( t , array ) {
10
10
const node = from ( array ) ;
@@ -18,7 +18,7 @@ function macro(t, array) {
18
18
const node = from ( array ) ;
19
19
const [ after , first ] = shift ( node ) ;
20
20
t . is ( array [ 0 ] , first . value ) ;
21
- const result = list ( map ( ( x ) => x . value , iter ( after ) ) ) ;
21
+ const result = list ( values ( after ) ) ;
22
22
t . deepEqual ( array . slice ( 1 ) , result ) ;
23
23
}
24
24
You can’t perform that action at this time.
0 commit comments