mirror of https://github.com/lukechilds/rollup.git
3 changed files with 29 additions and 0 deletions
@ -0,0 +1,5 @@ |
|||||
|
var assert = require('assert'); |
||||
|
|
||||
|
module.exports = { |
||||
|
description: 'dynamic object assignments should be imported' |
||||
|
}; |
@ -0,0 +1,3 @@ |
|||||
|
import tags from './tags'; |
||||
|
|
||||
|
assert(tags['[object Object]'], true); |
@ -0,0 +1,21 @@ |
|||||
|
// Emulates a piece of Lodash source code.
|
||||
|
// The tag strings are not imported, and a runtime error ensues.
|
||||
|
|
||||
|
let objTag = '[object Object]'; |
||||
|
let arrTag = '[object Array]'; |
||||
|
let fnTag = '[object Function]'; |
||||
|
let dateTag = '[object Date]'; |
||||
|
|
||||
|
let strTag = '[object String]'; |
||||
|
let numTag = '[object Number]'; |
||||
|
|
||||
|
// Only the code below is included in the bundle.
|
||||
|
|
||||
|
var tags = {}; |
||||
|
|
||||
|
tags[objTag] = tags[arrTag] = |
||||
|
tags[fnTag] = tags[dateTag] = true; |
||||
|
|
||||
|
tags[strTag] = tags[numTag] = false; |
||||
|
|
||||
|
export default tags; |
Loading…
Reference in new issue