mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
10 years ago
4 changed files with 26 additions and 0 deletions
@ -0,0 +1,3 @@ |
|||||
|
module.exports = { |
||||
|
description: 'method calls are assumed to mutate the owner' |
||||
|
}; |
@ -0,0 +1,15 @@ |
|||||
|
var obj = { |
||||
|
set: function ( key, value ) { |
||||
|
this[ key ] = value; |
||||
|
}, |
||||
|
|
||||
|
get: function ( key ) { |
||||
|
return this[ key ]; |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
obj.set( 'answer', 42 ); |
||||
|
|
||||
|
export default function ( key ) { |
||||
|
return obj.get( key ); |
||||
|
} |
@ -0,0 +1,3 @@ |
|||||
|
import foo from './foo'; |
||||
|
|
||||
|
assert.equal( foo( 'answer' ), 42 ); |
Loading…
Reference in new issue