模极社社区 - 制造业全产业链交流平台

    • 登录
    • 版块
    • 最新
    • 话题
    • 热门
    • 用户
    • 群组

    Dedent——模具行业从业者必备知识手册

    社区公告
    1
    1
    0
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • S
      system 2 最后由 编辑

      <h2>Dedent</h2>

      <p>An ES6 string tag that strips indentation from multi-line strings.</p>

      <h3>Usage</h3>

      <pre><code>
      import dedent from "dedent";

      function usageExample() {
      const first = dedentA string that gets so long you need to break it over multiple lines. Luckily dedent is here to keep it readable without lots of spaces ending up in the string itself.;

      const second = dedent`
      Leading and trailing lines will be trimmed, so you can write something like
      this and have it work as you expect:

        * how convenient it is
        * that I can use an indented list
           - and still have it do the right thing
      
      That's all.
      

      `;

      const third = dedent( Wait! I lied. Dedent can also be used as a function. );

      return first + "\n\n" + second + "\n\n" + third;
      }
      </code></pre>

      <pre><code>

      console.log(usageExample());
      </code></pre>

      <pre><code>
      A string that gets so long you need to break it over
      multiple lines. Luckily dedent is here to keep it
      readable without lots of spaces ending up in the string
      itself.

      Leading and trailing lines will be trimmed, so you can write something like
      this and have it work as you expect:

      • how convenient it is
      • that I can use an indented list
        • and still have it do the right thing

      That's all.

      Wait! I lied. Dedent can also be used as a function.
      </code></pre>

      <h3>License</h3>

      <p>MIT</p>

      <hr>

      <p>本文由模极社发布</p>

      <h4>📋 内容概览</h4>

      <table>
      <tr><td>分类</td><td>要点</td><td>建议/说明</td></tr>
      <tr><td>核心概念</td><td>Dedent</td><td>详见正文</td></tr>
      <tr><td>操作步骤</td><td>Dedent</td><td>详见正文</td></tr>
      <tr><td>注意事项</td><td>Dedent</td><td>详见正文</td></tr>
      <tr><td>适用场景</td><td>Dedent</td><td>详见正文</td></tr>
      <tr><td>常见问题</td><td>Dedent</td><td>详见正文</td></tr>
      </table>

      <hr>
      <h4>🔗 你可能还感兴趣</h4>
      <ul>
      <li><a href="/t/3443/3443">中鑫模具城</a></li>
      <li><a href="/t/4299/4299">content-disposition</a></li>
      <li><a href="/t/4378/4378">jest-mock</a></li>
      </ul>

      <hr>
      <p><strong>相关推荐:</strong></p>
      <ul>
      <li><a href="https://www.mj7.cn/t/4836-4836">北京模具产业 — 科技研发驱动型模具基地</a></li>
      <li><a href="https://www.mj7.cn/t/4835-4835">上海模具产业 — 高端精密模具研发中心</a></li>
      <li><a href="https://www.mj7.cn/t/4834-4834">产业集群与模具产业发展的关系</a></li>
      </ul>

      <hr>
      <p>有没有同行遇到过同样的问题?分享一下经验。</p>

      1 条回复 最后回复 回复 引用 0
      • First post
        Last post
      Powered by NodeBB | Contributors