Skip to content

Instantly share code, notes, and snippets.

@crisberrios
Created May 4, 2016 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crisberrios/8566d2d07677711014da7252d32fa093 to your computer and use it in GitHub Desktop.
Save crisberrios/8566d2d07677711014da7252d32fa093 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>
var org = {a: '1', b:'2'};
Object.defineProperties(org, {'a': {enumerable: false}});
obj = {...org};
console.dir(obj);
{
"name": "esnextbin-sketch",
"version": "0.0.0",
"dependencies": {
"babel-runtime": "6.6.1"
}
}
'use strict';
var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _defineProperties = require('babel-runtime/core-js/object/define-properties');
var _defineProperties2 = _interopRequireDefault(_defineProperties);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var org = { a: '1', b: '2' };
(0, _defineProperties2.default)(org, { 'a': { enumerable: false } });
obj = (0, _extends3.default)({}, org);
console.dir(obj);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment