{"id":27696185,"url":"https://github.com/ortegavan/pipes","last_synced_at":"2026-05-17T17:03:21.486Z","repository":{"id":289189559,"uuid":"970415673","full_name":"ortegavan/pipes","owner":"ortegavan","description":"Exemplo de pipes puros e impuros no Angular","archived":false,"fork":false,"pushed_at":"2025-04-23T02:27:30.000Z","size":180,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T05:49:54.663Z","etag":null,"topics":["angular"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ortegavan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-22T01:40:33.000Z","updated_at":"2025-04-23T02:27:34.000Z","dependencies_parsed_at":"2025-04-25T15:08:31.026Z","dependency_job_id":null,"html_url":"https://github.com/ortegavan/pipes","commit_stats":null,"previous_names":["ortegavan/pipes"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ortegavan/pipes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortegavan%2Fpipes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortegavan%2Fpipes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortegavan%2Fpipes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortegavan%2Fpipes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ortegavan","download_url":"https://codeload.github.com/ortegavan/pipes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ortegavan%2Fpipes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273392259,"owners_count":25097255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular"],"created_at":"2025-04-25T15:08:28.348Z","updated_at":"2026-05-17T17:03:21.430Z","avatar_url":"https://github.com/ortegavan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demonstração de pipes puros e impuros em Angular\n\nEste projeto demonstra a diferença entre pipes puros e impuros no Angular através de exemplos práticos.\n\n## Exemplos implementados\n\n### Pipe puro: FormatListPipe\n\n- Transforma um array em uma string formatada\n- Atualiza apenas quando a referência do array muda\n- Exemplo: converte `['Maçã', 'Banana', 'Laranja']` em \"Maçã, Banana e Laranja\"\n\n### Pipe impuro: TimeAgoPipe\n\n- Mostra o tempo decorrido desde uma data\n- Atualiza automaticamente a cada segundo\n- Exemplo: converte uma data em \"há 5 minutos\"\n\n## Como executar\n\n1. Clone o repositório\n2. Instale as dependências com `npm install`\n3. Execute o servidor de desenvolvimento com `ng serve`\n4. Acesse `http://localhost:4200`\n\n## Estrutura do projeto\n\n```\nsrc/app/\n├── pipes/\n│   ├── format-list.pipe.ts\n│   └── time-ago.pipe.ts\n├── app.component.ts\n├── app.component.html\n└── app.component.scss\n```\n\n## Testando os pipes\n\n### Pipe puro\n\n- Clique no botão \"Adicionar morango\"\n- Observe que a lista não atualiza automaticamente\n- O pipe só é executado quando a referência do array muda\n\n### Pipe impuro\n\n- Observe o tempo decorrido atualizando automaticamente\n- Clique em \"Atualizar post\" para ver o tempo reiniciar\n- O pipe é executado em cada ciclo de detecção de mudanças\n\n## Aprendizados\n\n- Pipes puros são mais eficientes pois são executados apenas quando necessário\n- Pipes impuros são úteis para dados que mudam frequentemente\n- Escolha o tipo de pipe baseado na frequência de atualização necessária\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fortegavan%2Fpipes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fortegavan%2Fpipes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fortegavan%2Fpipes/lists"}