made with esnextbin
Created
December 14, 2016 15:34
-
-
Save ScottWhittaker/7d9e80913beb07fc3d5a5355ea29bafe to your computer and use it in GitHub Desktop.
esnextbin sketch
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>ESNextbin Sketch</title> | |
<!-- put additional styles and scripts here --> | |
<style> | |
body { | |
font-family: sans-serif; | |
} | |
</style> | |
</head> | |
<body> | |
<!-- put markup and other contents here --> | |
<header> | |
<h1></h1> | |
</header> | |
</body> | |
</html> |
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
// write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
import has from 'lodash/has'; | |
const greeting = 'Hello ESNEXTBIN'; | |
const h1 = document.querySelector('header h1'); | |
h1.textContent = greeting; | |
const data = {a: {b: 2}}; | |
console.log(has(data, 'a')); | |
console.log(has(data, 'x')); | |
console.log(has(data.a, 'b')); |
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
{ | |
"name": "esnextbin-sketch", | |
"version": "0.0.0", | |
"dependencies": { | |
"lodash": "4.17.2" | |
} | |
} |
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'; | |
var _has = require('lodash/has'); | |
var _has2 = _interopRequireDefault(_has); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
var greeting = 'Hello ESNEXTBIN'; // write ES2015 code and import modules from npm | |
// and then press "Execute" to run your program | |
var h1 = document.querySelector('header h1'); | |
h1.textContent = greeting; | |
var data = { a: { b: 2 } }; | |
console.log((0, _has2.default)(data, 'a')); | |
console.log((0, _has2.default)(data, 'x')); | |
console.log((0, _has2.default)(data.a, 'b')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment