mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
8 years ago
15 changed files with 158 additions and 1 deletions
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
description: 'discards a self-calling function with side-effects' |
|||
}; |
@ -0,0 +1,20 @@ |
|||
define(function () { 'use strict'; |
|||
|
|||
function foo ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) foo( x - 1 ); |
|||
} |
|||
|
|||
function bar ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) baz( x ); |
|||
} |
|||
|
|||
function baz ( x ) { |
|||
bar( x - 1 ); |
|||
} |
|||
|
|||
foo( 10 ); |
|||
bar( 10 ); |
|||
|
|||
}); |
@ -0,0 +1,18 @@ |
|||
'use strict'; |
|||
|
|||
function foo ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) foo( x - 1 ); |
|||
} |
|||
|
|||
function bar ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) baz( x ); |
|||
} |
|||
|
|||
function baz ( x ) { |
|||
bar( x - 1 ); |
|||
} |
|||
|
|||
foo( 10 ); |
|||
bar( 10 ); |
@ -0,0 +1,16 @@ |
|||
function foo ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) foo( x - 1 ); |
|||
} |
|||
|
|||
function bar ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) baz( x ); |
|||
} |
|||
|
|||
function baz ( x ) { |
|||
bar( x - 1 ); |
|||
} |
|||
|
|||
foo( 10 ); |
|||
bar( 10 ); |
@ -0,0 +1,21 @@ |
|||
(function () { |
|||
'use strict'; |
|||
|
|||
function foo ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) foo( x - 1 ); |
|||
} |
|||
|
|||
function bar ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) baz( x ); |
|||
} |
|||
|
|||
function baz ( x ) { |
|||
bar( x - 1 ); |
|||
} |
|||
|
|||
foo( 10 ); |
|||
bar( 10 ); |
|||
|
|||
}()); |
@ -0,0 +1,24 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
|||
typeof define === 'function' && define.amd ? define(factory) : |
|||
(factory()); |
|||
}(this, (function () { 'use strict'; |
|||
|
|||
function foo ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) foo( x - 1 ); |
|||
} |
|||
|
|||
function bar ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) baz( x ); |
|||
} |
|||
|
|||
function baz ( x ) { |
|||
bar( x - 1 ); |
|||
} |
|||
|
|||
foo( 10 ); |
|||
bar( 10 ); |
|||
|
|||
}))); |
@ -0,0 +1,16 @@ |
|||
function foo ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) foo( x - 1 ); |
|||
} |
|||
|
|||
function bar ( x ) { |
|||
effect( x ); |
|||
if ( x > 0 ) baz( x ); |
|||
} |
|||
|
|||
function baz ( x ) { |
|||
bar( x - 1 ); |
|||
} |
|||
|
|||
foo( 10 ); |
|||
bar( 10 ); |
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
description: 'discards a self-calling function without side-effects' |
|||
}; |
@ -0,0 +1,5 @@ |
|||
define(function () { 'use strict'; |
|||
|
|||
|
|||
|
|||
}); |
@ -0,0 +1,2 @@ |
|||
'use strict'; |
|||
|
@ -0,0 +1,6 @@ |
|||
(function () { |
|||
'use strict'; |
|||
|
|||
|
|||
|
|||
}()); |
@ -0,0 +1,9 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
|||
typeof define === 'function' && define.amd ? define(factory) : |
|||
(factory()); |
|||
}(this, (function () { 'use strict'; |
|||
|
|||
|
|||
|
|||
}))); |
@ -0,0 +1,14 @@ |
|||
function foo ( x ) { |
|||
if ( x > 0 ) foo( x - 1 ); |
|||
} |
|||
|
|||
function bar ( x ) { |
|||
if ( x > 0 ) baz( x ); |
|||
} |
|||
|
|||
function baz ( x ) { |
|||
bar( x - 1 ); |
|||
} |
|||
|
|||
foo( 10 ); |
|||
bar( 10 ); |
Loading…
Reference in new issue