mirror of https://github.com/lukechilds/rollup.git
Brian Donovan
9 years ago
8 changed files with 52 additions and 1 deletions
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
description: 'object destructuring default values are preserved' |
|||
}; |
@ -0,0 +1,9 @@ |
|||
define(function () { 'use strict'; |
|||
|
|||
const a = 1; |
|||
const b = 2; |
|||
const { c = a } = {}; |
|||
const [ d = b ] = []; |
|||
console.log(c, d); |
|||
|
|||
}); |
@ -0,0 +1,7 @@ |
|||
'use strict'; |
|||
|
|||
const a = 1; |
|||
const b = 2; |
|||
const { c = a } = {}; |
|||
const [ d = b ] = []; |
|||
console.log(c, d); |
@ -0,0 +1,5 @@ |
|||
const a = 1; |
|||
const b = 2; |
|||
const { c = a } = {}; |
|||
const [ d = b ] = []; |
|||
console.log(c, d); |
@ -0,0 +1,9 @@ |
|||
(function () { 'use strict'; |
|||
|
|||
const a = 1; |
|||
const b = 2; |
|||
const { c = a } = {}; |
|||
const [ d = b ] = []; |
|||
console.log(c, d); |
|||
|
|||
})(); |
@ -0,0 +1,13 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
|||
typeof define === 'function' && define.amd ? define(factory) : |
|||
factory(); |
|||
}(this, function () { 'use strict'; |
|||
|
|||
const a = 1; |
|||
const b = 2; |
|||
const { c = a } = {}; |
|||
const [ d = b ] = []; |
|||
console.log(c, d); |
|||
|
|||
})); |
@ -0,0 +1,5 @@ |
|||
const a = 1; |
|||
const b = 2; |
|||
const { c = a } = {}; |
|||
const [ d = b ] = []; |
|||
console.log(c, d); |
Loading…
Reference in new issue