made with esnextbin
Created
February 20, 2016 12:46
-
-
Save nfcampos/481ad667c6d618bee4f2 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 --> | |
</head> | |
<body> | |
<div id='Set'></div> | |
<div id='BadSet'></div> | |
</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
import BadSet from 'yup/src/util/set' | |
date = new Date('12-12-12') | |
same_date = new Date('12-12-12') | |
badset = new BadSet() | |
badset.add(date) | |
console.log(badset.has(same_date)) | |
set = new Set() | |
set.add(date) | |
console.log(set.has(same_date)) |
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": { | |
"yup": "0.14.1", | |
"babel-runtime": "6.5.0" | |
} | |
} |
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 _set = require('babel-runtime/core-js/set'); | |
var _set2 = _interopRequireDefault(_set); | |
var _set3 = require('yup/src/util/set'); | |
var _set4 = _interopRequireDefault(_set3); | |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | |
date = new Date('12-12-12'); | |
same_date = new Date('12-12-12'); | |
badset = new _set4.default(); | |
badset.add(date); | |
console.log(badset.has(same_date)); | |
set = new _set2.default(); | |
set.add(date); | |
console.log(set.has(same_date)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment