PageSourceSearch

https://www.awesomecodereviews.com/component---src-pages-articles-js-4e9bf3fe18e3cccb0d42.js

js awesomecodereviews.com collected 2026-10-03 23:49:20 UTC 6,926 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkgatsby_starter_blog=self.webpackChunkgatsby_starter_blog||[]).push([[672],{212:function(e,t,l){l.r(t);var a=l(4506),r=l(8007),n=l(6540),i=l(7422),c=l(7528);const s={fundamentals:{label:"Fundamentals",tone:"purple"},"best-practices":{label:"Best practices",tone:"green"},"code-reading":{label:"Review techniques",tone:"blue"},collaboration:{label:"Collaboration",tone:"coral"},checklists:{label:"Checklists",tone:"yellow"},automation:{label:"Automation",tone:"green"},tools:{label:"Tools",tone:"blue"},security:{label:"Security",tone:"coral"},companies:{label:"Industry practice",tone:"yellow"},devex:{label:"Developer experience",tone:"purple"},research:{label:"Research & evidence",tone:"yellow"},video:{label:"Video",tone:"blue"},general:{label:"General",tone:"purple"}},o=["fundamentals","best-practices","code-reading","collaboration","checklists","automation","tools","security","companies","devex","research","video","general"],m={topic:"Group by topic",title:"Title A–Z",recent:"Recently updated"},d=e=>s[e]?s[e]:{label:e.split("-").filter(Boolean).map((e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`)).join(" "),tone:"purple"},p=e=>{const t=(e||[]).map((e=>(e=>String(e||"").trim().toLowerCase().replace(/[\s_]+/g,"-"))(Array.isArray(e)?e[0]:e))).filter(Boolean);return t.length?(0,a.A)(new Set(t)):["general"]},u=e=>{const t=String(e||"").replace(/\s+/g," ").trim();if(!t)return"A practical guide from the Awesome Code Reviews knowledge hub.";return(t.replace(/\bDr\./g,"Dr∯").replace(/\be\.g\./gi,"e∯g∯").replace(/\bi\.e\./gi,"i∯e∯").match(/[^.!?]+(?:[.!?]+(?=\s|$)|$)/g)||[]).slice(0,2).join(" ").replace(/∯/g,".").trim()},b=e=>(0,a.A)(e).sort(((e,t)=>e.title.localeCompare(t.title,"en"))),g=e=>{let{article:t}=e;return n.createElement(r.Link,{className:"article-index-card",to:t.slug},n.createElement("div",{className:"article-index-card__meta"},n.createElement("ul",{"aria-label":"Topics"},t.topics.map((e=>{const t=d(e);return n.createElement("li",{className:`article-index-chip article-index-chip--${t.tone}`,key:e},t.label)}))),t.date&&n.createElement("time",{dateTime:t.date},new Intl.DateTimeFormat("en",{month:"short",year:"numeric"}).format(new Date(t.date)))),n.createElement("h3",null,t.title),n.createElement("p",null,t.summary),n.createElement("span",{className:"article-index-card__cta"},"Read article ",n.createElement("span",{"aria-hidden":"true"},"→")))};t.default=e=>{var t;let{data:l,location:r}=e;const s=(null===(t=l.site.siteMetadata)||void 0===t?void 0:t.title)||"Awesome Code Reviews",[h,E]=n.useState("all"),[y,v]=n.useState("topic"),w=n.useMemo((()=>l.allMarkdownRemark.nodes.map((e=>{const t=p(e.frontmatter.topics);return{title:e.frontmatter.title,slug:e.fields.slug,topics:t,primaryTopic:t[0],summary:u(e.frontmatter.description||e.frontmatter.excerpt||e.generatedExcerpt),date:e.frontmatter.updated||e.frontmatter.date}}))),[l.allMarkdownRemark.nodes]),x=n.useMemo((()=>o.map((e=>({id:e,count:w.filter((t=>t.topics.includes(e))).length,...d(e)}))).filter((e=>e.count>0))),[w]),f="all"===h?w:w.filter((e=>e.topics.includes(h)));let N;if("topic"===y&&"all"===h)N=x.map((e=>({id:e.id,label:e.label,tone:e.tone,articles:b(f.filter((t=>t.primaryTopic===e.id)))}))).filter((e=>e.articles.length>0));else{const e="recent"===y?(e=>(0,a.A)(e).sort(((e,t)=>new Date(t.date||0).getTime()-new Date(e.date||0).getTime()||e.title.localeCompare(t.title,"en"))))(f):b(f),t="all"===h?{label:"All articles",tone:"purple"}:d(h);N=[{id:h,label:t.label,tone:t.tone,articles:e}]}return n.createElement(i.A,{location:r,title:s},n.createElement(c.A,{title:"All code review articles",description:"Browse every published Awesome Code Reviews article, organized by topic with concise summaries."}),n.createElement("main",{className:"article-index"},n.createElement("section",{className:"article-index-hero"},n.createElement("div",{className:"content"},n.createElement("div",{className:"article-index-hero__copy"},n.createElement("p",null,"Awesome Code Reviews library"),n.createElement("h1",null,"Every article, clearly organized."),n.createElement("span",null,"Browse the complete collection by topic, scan a short summary, and find the guide you need without digging.")),n.createElement("div",{className:"article-index-hero__stats","aria-label":"Library size"},n.createElement("strong",null,w.length),n.createElement("span",null,"published articles"),n.createElement("i",{"aria-hidden":"true"}),n.createElement("strong",null,x.length),n.createElement("span",null,"topics")))),n.createElement("section",{className:"article-index-browser content","aria-labelledby":"article-index-heading"},n.createElement("div",{className:"article-index-browser__controls"},n.createElement("header",{className:"article-index-browser__heading"},n.createElement("h2",{id:"article-index-heading"},"Browse the library")),n.createElement("details",{className:"article-index-filter-panel"},n.createElement("summary",null,n.createElement("span",{className:"article-index-filter-panel__label"},n.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 24 24"},n.createElement("path",{d:"M4 6h16M7 12h10M10 18h4"})),"Filter & sort"),n.createElement("svg",{className:"article-index-filter-panel__chevron","aria-hidden":"true",viewBox:"0 0 24 24"},n.createElement("path",{d:"m7 9 5 5 5-5"}))),n.createElement("div",{className:"article-index-toolbar"},n.createElement("div",{className:"article-index-filters","aria-label":"Filter articles by topic"},n.createElement("button",{type:"button",className:"all"===h?"is-active":"",onClick:()=>E("all"),"aria-pressed":"all"===h},"All topics ",n.createElement("span",null,w.length)),x.map((e=>n.createElement("button",{type:"button",className:`article-index-filter--${e.tone}${h===e.id?" is-active":""}`,onClick:()=>E(e.id),"aria-pressed":h===e.id,key:e.id},e.label," ",n.createElement("span",null,e.count))))),n.createElement("label",{className:"article-index-sort"},n.createElement("span",null,"Order"),n.createElement("select",{value:y,onChange:e=>v(e.target.value)},Object.entries(m).map((e=>{let[t,l]=e;return n.createElement("option",{value:t,key:t},l)})))))),n.createElement("p",{className:"article-index-results","aria-live":"polite"},"Showing ",f.length," ",1===f.length?"article":"articles","all"===h?"":` about ${d(h).label.toLowerCase()}`)),n.createElement("div",{className:"article-index-groups"},N.map(((e,t)=>n.createElement("section",{className:`article-index-group article-index-group--${e.tone}`,key:e.id},n.createElement("header",null,n.createElement("span",null,String(t+1).padStart(2,"0")),n.createElement("h2",null,e.label),n.createElement("p",null,e.articles.length," ",1===e.articles.length?"article":"articles")),n.createElement("div",{className:"article-index-grid"},e.articles.map((e=>n.createElement(g,{article:e,key:e.slug})))))))))))}}}]);
2//# sourceMappingURL=component---src-pages-articles-js-4e9bf3fe18e3cccb0d42.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.