-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
_expected.js
31 lines (28 loc) · 1.25 KB
/
_expected.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const map2 = [ 1 ].map( x => console.log( 1 ) );
const map4 = [ 1 ].map( x => x ).map( x => console.log( 1 ) );
const map5 = [ 1 ].map( x => console.log( 1 ) ).map( x => x );
const map7 = [ 1 ].map( x => x ).map( x => x ).map( x => console.log( 1 ) );
const map8 = [ 1 ].map( x => x ).map( x => console.log( 1 ) ).map( x => x );
[]();
const _everyEffect = [ 1 ].every( () => console.log( 1 ) || true );
const _filterEffect = [ 1 ].filter( () => console.log( 1 ) || true );
const _findEffect = [ 1 ].find( () => console.log( 1 ) || true );
const _findIndexEffect = [ 1 ].findIndex( () => console.log( 1 ) || true );
const _forEachEffect = [ 1 ].forEach( () => console.log( 1 ) || true );
const _mapEffect = [ 1 ].map( () => console.log( 1 ) || 1 );
const _reduceEffect = [ 1 ].reduce( () => console.log( 1 ) || 1, 1 );
const _reduceRightEffect = [ 1 ].reduceRight( () => console.log( 1 ) || 1, 1 );
const _someEffect = [ 1 ].some( () => console.log( 1 ) || true );
// mutator methods
const exported = [ 1 ];
exported.copyWithin( 0 );
exported.fill( 0 );
exported.pop();
exported.push( 0 );
exported.reverse();
exported.shift();
const _sortEffect = [ 1 ].sort( () => console.log( 1 ) || 0 );
exported.sort();
exported.splice( 0 );
exported.unshift( 0 );
export { exported };