Getting a list of Blink Components

This is mostly for me to remember.
I needed to build a mapping of DevRel support to Blink Components, and I really didn’t want to have to manually work out all the components by hand.
If you want to get a list of components in Blink, there is a file that has all the details you need.
If you are Promise inclined, here is a quick way to do it.

<p>This is mostly for me to remember.</p>
<p>I needed to build a mapping of DevRel support to Blink Components, and I really didn't want to have to manually work out all the components by hand.</p>
<p>If you want to get a list of components in Blink, there is a <a href="https://storage.googleapis.com/chromium-owners/component_map.json">file</a> that has all the details you need.</p>
<p>If you are Promise inclined, here is a quick way to do it.</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-fallback" data-lang="fallback">fetch('https://storage.googleapis.com/chromium-owners/component_map.json')
.then(body => body.json())
.then(d=>console.log(Object.keys(d["component-to-team"]).filter(i=>i.startsWith('Bli')).join(',')))
.catch(console.err)
</code></pre></div><p>If you are async/await inclined, here is the same code.</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-fallback" data-lang="fallback">let res = await fetch('https://storage.googleapis.com/chromium-owners/component_map.json');
let body = await res.json();
console.log(Object.keys(body["component-to-team"]).filter(i=>i.startsWith('Bli')).join(','))
</code></pre></div><p>Now to work out how we get a list of all the OWNERS programatically so that our team will always know the correct people to speak to.</p>


Print Share Comment Cite Upload Translate
APA
Paul Kinlan | Sciencx (2024-03-29T15:58:21+00:00) » Getting a list of Blink Components. Retrieved from https://www.scien.cx/2020/04/07/getting-a-list-of-blink-components/.
MLA
" » Getting a list of Blink Components." Paul Kinlan | Sciencx - Tuesday April 7, 2020, https://www.scien.cx/2020/04/07/getting-a-list-of-blink-components/
HARVARD
Paul Kinlan | Sciencx Tuesday April 7, 2020 » Getting a list of Blink Components., viewed 2024-03-29T15:58:21+00:00,<https://www.scien.cx/2020/04/07/getting-a-list-of-blink-components/>
VANCOUVER
Paul Kinlan | Sciencx - » Getting a list of Blink Components. [Internet]. [Accessed 2024-03-29T15:58:21+00:00]. Available from: https://www.scien.cx/2020/04/07/getting-a-list-of-blink-components/
CHICAGO
" » Getting a list of Blink Components." Paul Kinlan | Sciencx - Accessed 2024-03-29T15:58:21+00:00. https://www.scien.cx/2020/04/07/getting-a-list-of-blink-components/
IEEE
" » Getting a list of Blink Components." Paul Kinlan | Sciencx [Online]. Available: https://www.scien.cx/2020/04/07/getting-a-list-of-blink-components/. [Accessed: 2024-03-29T15:58:21+00:00]
rf:citation
» Getting a list of Blink Components | Paul Kinlan | Sciencx | https://www.scien.cx/2020/04/07/getting-a-list-of-blink-components/ | 2024-03-29T15:58:21+00:00
https://github.com/addpipe/simple-recorderjs-demo