- interpretada
- JIT (just-in-time) por causa da v8, tendo em vista as inumeras otimizações e melhorias de um interpretador normal
- functions as first-class citzens (funções podem ser atribuídas a variáveis e constantes, podem ser retornadas por outras funções, usadas como parâmetros etc)
- não bloqueante
- concorrente
- baseado em prototipos
- tipagem dinamica
- multi paradigma (suporta POO, FP, imperativa, declarativa..)
- roda em diferentes ambientes (navegador, plataforma node...)
- sincrona
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
/* | |
* Returns a new array without items whose property received is duplicated. | |
* | |
* @example | |
* removeDuplicatesByProp([ | |
* {id: 1, name: 'apple'}, | |
* {id: 2, name: 'apple'}, | |
* {id: 3, name: 'orange'} | |
* ], 'name'); | |
* //=> [{id: 1, name: 'apple'}, {id: 3, name: 'orange'}] |
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
<?php | |
get_header(); | |
$estrutura = get_estrutura_pesquisa(); | |
?> | |
<script type="text/javascript"> | |
var _estrutura = <?php echo json_encode($estrutura); ?>; | |
var can_publish = <?php echo json_encode(posso_publicar()); ?>; | |
</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
type None = void | null | undefined; | |
const isNone = (value: unknown): value is None => { | |
return value === null || typeof value === 'undefined'; | |
}; | |
const isMaybe = (value: unknown): value is Maybe<any> => { | |
return !!(value && (value as { _isMaybe?: any })._isMaybe); | |
}; |
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
<script> | |
import { mask } from 'vue-the-mask' | |
export default { | |
name: 'a-input', | |
props: { | |
styleContainer: { | |
type: Object, | |
default: () => ({ 'width': '100%' }) |