Skip to content

Instantly share code, notes, and snippets.

@mattiashtd
Created January 14, 2020 14:20
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 mattiashtd/cbfeb72f37fe523953405e88db0d5f3a to your computer and use it in GitHub Desktop.
Save mattiashtd/cbfeb72f37fe523953405e88db0d5f3a to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/haxizaj
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdn.jsdelivr.net/momentjs/2.14.1/moment-with-locales.min.js"></script>
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
</head>
<body>
<script id="jsbin-javascript">
"use strict";
console.clear();
var obj = { a: 1, b: 2 };
var Cypress = {};
Cypress._ = _;
Cypress.moment = moment;
console.log(_.get(obj, "a"));
console.log(Cypress.moment().format("DD/MM/YYYY"));
</script>
<script id="jsbin-source-javascript" type="text/javascript">console.clear();
const obj = {a: 1, b: 2};
const Cypress = {};
Cypress._ = _;
Cypress.moment = moment;
console.log(_.get(obj, "a"));
console.log(Cypress.moment().format("DD/MM/YYYY"));</script></body>
</html>
"use strict";
console.clear();
var obj = { a: 1, b: 2 };
var Cypress = {};
Cypress._ = _;
Cypress.moment = moment;
console.log(_.get(obj, "a"));
console.log(Cypress.moment().format("DD/MM/YYYY"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment