- Early work by Ihab Awad (Google) and Kris Kowal (FastSoft)
- 2009-09: 2nd draft of module strawman, still very close to "closures as modules",
export x = 42
This file contains hidden or 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
fetch(url, { | |
method: "get", //put your method | |
headers: { | |
"Content-Type": "application/json", | |
"X-Requested-With": "XMLHttpRequest", | |
"Access-Control-Allow-Origin": "*" | |
}, | |
mode: 'no-cors' | |
}); |
This file contains hidden or 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
"prettier": { | |
"useTabs": true, | |
"semi": false, | |
"singleQuote": false, | |
"bracketSpacing": true, | |
"trailingComma": "es5", | |
"printWidth": 160 | |
}, | |
"eslintConfig": { | |
"parserOptions": { |
This file contains hidden or 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 telefone_validation(telefone) { | |
//retira todos os caracteres menos os numeros | |
telefone = telefone.replace(/\D/g, ''); | |
//verifica se tem a qtde de numero correto | |
if (!(telefone.length >= 10 && telefone.length <= 11)) return false; | |
//Se tiver 11 caracteres, verificar se começa com 9 o celular | |
if (telefone.length == 11 && parseInt(telefone.substring(2, 3)) != 9) return false; |
This file contains hidden or 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(){ | |
// como vamos usar o throttle varias vezes (no scroll e no resize), | |
// encapsulei essa funcionalidade numa função | |
function throttle(fn) { | |
fn.jarodei = false; | |
return function(){ | |
if (fn.jarodei) return; | |
fn.jarodei = true; |