Created
August 17, 2016 15:29
-
-
Save Rich-Harris/9d2ee49408d0e18b29383404e6813c49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function toFastProperties(obj) { | |
function f() {} | |
f.prototype = obj; | |
new f(); | |
return; | |
eval(obj); | |
} | |
const obj = {}; | |
toFastProperties(obj); | |
module.exports = obj; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toFastProperties(obj) { | |
function f() {} | |
f.prototype = obj; | |
new f(); | |
return; | |
eval(obj); | |
} | |
const obj = {}; | |
toFastProperties(obj); | |
export default obj; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"devDependencies": { | |
"rollup": "^0.34.10" | |
}, | |
"scripts": { | |
"build": "rollup -c" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
entry: 'index.js', | |
dest: 'bundle.js', | |
format: 'cjs' | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment