I hereby claim:
- I am moondef on github.
- I am moondef (https://keybase.io/moondef) on keybase.
- I have a public key ASAW9bhoDdIss5QcCGAWNrmJ0v9Ymhmndj9ZeClLIXMlRQo
To claim this, I am signing this object:
*.html linguist-language=JavaScript |
const getAngle = (hour, min) => Math.abs(30 * ((hour % 12) + min / 60) - min * 6); |
const balancedNum = number => { | |
const str = number.toString(); | |
const getMiddle = s => { | |
const splited = s.split(''); | |
if (splited.length % 2 === 0) { | |
return splited[splited.length / 2 - 1] + splited[splited.length / 2]; | |
} else { | |
return splited[Math.floor(splited.length / 2)]; | |
} |
I hereby claim:
To claim this, I am signing this object:
{ | |
"title": "test json", | |
"data": [ | |
{ "name": "firstName1", "price": 300 }, | |
{ "name": "firstName2", "price": 400 }, | |
{ "name": "firstName3", "price": 500 } | |
] | |
} |
{ | |
"data": [ | |
{ | |
"id": 0, | |
"name": "Bulbasaur", | |
"price": 30, | |
"image": "https://img.pokemondb.net/artwork/bulbasaur.jpg", | |
"type": ["grass", "poison"], | |
"species": "Seed Pokemon", | |
"abilities": [ |
const addToCart = (cart, pokemon) => { | |
if (inCart(cart, pokemon)) { | |
cart.find(item => item.name === pokemon.name).count += 1; | |
} else { | |
pokemon['count'] = 1 | |
cart.push(pokemon) | |
} | |
return cart | |
} |
const arr = [1, 4, 2, 5, 200, 6, 9] | |
const qsort = (arr) => { | |
if (arr.length < 2) { | |
return arr | |
} else { | |
const pivot = arr[Math.floor(Math.random() * arr.length)] | |
const less = arr.filter(value => value < pivot) | |
const greater = arr.filter(value => value > pivot) |
{ | |
"presets": ["flow"], | |
"plugins": [ | |
["react-flow-props-to-prop-types"] | |
] | |
} |
weirdReverse=a=>a.sort(_=>1) |