Skip to content

Instantly share code, notes, and snippets.

@aledoroshenko
Last active November 1, 2016 10:58
Show Gist options
  • Save aledoroshenko/dde976f8d637bf2cb5ce7f192559e59d to your computer and use it in GitHub Desktop.
Save aledoroshenko/dde976f8d637bf2cb5ce7f192559e59d to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
</body>
</html>
import _ from 'lodash';
var test = {
name1: '1',
name2: '2',
name3: '3'
};
console.log(_.get(test, name, 'no name'));
{
"name": "esnextbin-sketch",
"version": "0.0.0",
"dependencies": {
"lodash": "4.16.4"
}
}
'use strict';
var _lodash = require('lodash');
var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var test = {
name1: '1',
name2: '2',
name3: '3'
};
console.log(_lodash2.default.get(test, name, 'no name'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment