Skip to content

Instantly share code, notes, and snippets.

@AshikNesin
Created April 19, 2017 10:35
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 AshikNesin/8ad705a4fb5e617ce916754e90ba93cc to your computer and use it in GitHub Desktop.
Save AshikNesin/8ad705a4fb5e617ce916754e90ba93cc to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
</body>
</html>
// const freqIntervalItems = [
// [
// { value: 2, label: 'Monday' },
// ],
// [{ value: 1, label: 'Sunday' },
// { value: 16, label: 'Thursday' },
// ],
// ]
// const allFreq = []
// freqIntervalItems.map((item)=>{
// item.map((el)=>{
// allFreq.push(el)
// })
// })
// const frequencyInterval = [
// { value: 1, label: 'Sunday' },
// { value: 2, label: 'Monday' },
// { value: 4, label: 'Tuesday' },
// { value: 8, label: 'Wednesday' },
// { value: 16, label: 'Thursday' },
// { value: 32, label: 'Friday' },
// { value: 64, label: 'Saturday' },
// ]
// console.log(allFreq)
// // const frequencyIntervalSelected = [
// // { value: 1, label: 'Sunday' },
// // { value: 2, label: 'Monday' },
// // ]
// const arr = _.differenceBy(frequencyInterval,allFreq,'value')
// console.log(arr)
const arr =
[{
id:1,
value:"WTF"
},
{
id:1,
value:"FTW"
}
]
// function hasDuplicates(array) {
// return (new Set(array)).size !== array.length;
// }
{
"name": "esnextbin-sketch",
"version": "0.0.0"
}
"use strict";
// const freqIntervalItems = [
// [
// { value: 2, label: 'Monday' },
// ],
// [{ value: 1, label: 'Sunday' },
// { value: 16, label: 'Thursday' },
// ],
// ]
// const allFreq = []
// freqIntervalItems.map((item)=>{
// item.map((el)=>{
// allFreq.push(el)
// })
// })
// const frequencyInterval = [
// { value: 1, label: 'Sunday' },
// { value: 2, label: 'Monday' },
// { value: 4, label: 'Tuesday' },
// { value: 8, label: 'Wednesday' },
// { value: 16, label: 'Thursday' },
// { value: 32, label: 'Friday' },
// { value: 64, label: 'Saturday' },
// ]
// console.log(allFreq)
// // const frequencyIntervalSelected = [
// // { value: 1, label: 'Sunday' },
// // { value: 2, label: 'Monday' },
// // ]
// const arr = _.differenceBy(frequencyInterval,allFreq,'value')
// console.log(arr)
var arr = [{
id: 1,
value: "WTF"
}, {
id: 1,
value: "FTW"
}];
// function hasDuplicates(array) {
// return (new Set(array)).size !== array.length;
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment