Skip to content

Instantly share code, notes, and snippets.

@pimatco
pimatco / isAvailableFunction
Created December 7, 2017 16:31
Check if a value exists, otherwise pass Undefined
function isAvailable(param){
if(!param){
return param='Undefined'
}else{
return param=param;
}
}
@pimatco
pimatco / pushToArray.txt
Last active December 7, 2017 16:30
Push values to an Array Function Javascript
function pushToArray(array, descricao, value){
array.push({descricao: value});
}
@pimatco
pimatco / SelecionarValoresUnicosDeJsonComJavascript.txt
Last active March 6, 2021 18:23
Select unique values from JSON file when clicking a button with Javascript
var json = [
{
"Year": 2001
},
{
"Year": 2017
},
{
"Year": 1900
},
@pimatco
pimatco / all-angular-material-components-imports.txt
Last active December 6, 2023 15:24
All Angular Material Components Imports from app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
//Angular Material Components
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatCheckboxModule} from '@angular/material';
import {MatButtonModule} from '@angular/material';
@pimatco
pimatco / estados-cidades-capitais.json
Last active June 24, 2022 14:05 — forked from letanure/estados-cidades.json
JSON com Estados Cidades Capitais e Regiões
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"região": "Norte",
"capital": "Rio Branco",
"cidades": [
"Acrelândia",
"Assis Brasil",