<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fuji_haruka</author_name>
  <author_url>https://blog.hatena.ne.jp/fuji_haruka/</author_url>
  <blog_title>Fuji Haruka's blog</blog_title>
  <blog_url>https://hfuji.hatenablog.jp/</blog_url>
  <categories>
    <anon>Node.js</anon>
  </categories>
  <description>ファイル index.js から require されている全モジュールの個数を知るには、require してみて require.cache を見ればよい。なので、 $ node -p 'require(&quot;./index.js&quot;) &amp;&amp; Object.keys(require.cache).length' これで数えられる。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhfuji.hatenablog.jp%2Fentry%2F2019%2F12%2F31%2F164912&quot; title=&quot;【Node.js】あるファイルからrequireされているモジュールを数えるワンライナー - Fuji Haruka&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-12-31 16:49:12</published>
  <title>【Node.js】あるファイルからrequireされているモジュールを数えるワンライナー</title>
  <type>rich</type>
  <url>https://hfuji.hatenablog.jp/entry/2019/12/31/164912</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
