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
function App1() { | |
return <Greeting firstName="Ben" lastName="Hector" />; | |
} | |
function App2() { | |
const props = { firstName: 'Ben', lastName: 'Hector' }; | |
return <Greeting {...props} />; | |
} |
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 { gql, useQuery } from '@apollo/client'; | |
const GET_DOGS = gql` | |
query GetDogs { | |
dogs { | |
id | |
breed | |
} | |
} | |
`; |
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
<div ondragover="allowDrop(event)"> | |
Drop here | |
</div> | |
<script> | |
function allowDrop(ev) { | |
ev.preventDefault(); | |
} | |
</script> |
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"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script src="https://unpkg.com/@reactivex/[email protected]/dist/global/Rx.js"></script> | |
<script src="script.js"></script> |
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
const findInFiles = require('find-in-files'); | |
const fs = require('fs'); | |
findInFiles.find('import', 'src', '.ts$') | |
.then(results => { | |
const files = Object.keys(results); | |
files.forEach((file) => { | |
let result = fs.readFileSync(file, 'utf8'); | |
console.log(result); |
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
// run with : | |
// node --trace_deopt --allow-natives-syntax FILENAME | |
function adder(a, b) { | |
return new Function('a', 'b', 'return b%2 ? a + b : b%3 ? a - b : b%5 ? b / a : a * b')(a, b); | |
} | |
function addereval(a, b) { | |
return eval('b%2 ? a + b : b%3 ? a - b : b%5 ? b / a : a * b'); | |
} |