<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Dedent——模具行业从业者必备知识手册]]></title><description><![CDATA[<p dir="auto">&lt;h2&gt;Dedent&lt;/h2&gt;</p>
<p dir="auto">&lt;p&gt;An ES6 string tag that strips indentation from multi-line strings.&lt;/p&gt;</p>
<p dir="auto">&lt;h3&gt;Usage&lt;/h3&gt;</p>
<p dir="auto">&lt;pre&gt;&lt;code&gt;<br />
import dedent from "dedent";</p>
<p dir="auto">function usageExample() {<br />
const first = dedent<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.</code>;</p>
<p dir="auto">const second = dedent`<br />
Leading and trailing lines will be trimmed, so you can write something like<br />
this and have it work as you expect:</p>
<pre><code>  * how convenient it is
  * that I can use an indented list
     - and still have it do the right thing

That's all.
</code></pre>
<p dir="auto">`;</p>
<p dir="auto">const third = dedent(<code>    Wait! I lied. Dedent can also be used as a function.  </code>);</p>
<p dir="auto">return first + "\n\n" + second + "\n\n" + third;<br />
}<br />
&lt;/code&gt;&lt;/pre&gt;</p>
<p dir="auto">&lt;pre&gt;&lt;code&gt;</p>
<blockquote>
<p dir="auto">console.log(usageExample());<br />
&lt;/code&gt;&lt;/pre&gt;</p>
</blockquote>
<p dir="auto">&lt;pre&gt;&lt;code&gt;<br />
A string that gets so long you need to break it over<br />
multiple lines. Luckily dedent is here to keep it<br />
readable without lots of spaces ending up in the string<br />
itself.</p>
<p dir="auto">Leading and trailing lines will be trimmed, so you can write something like<br />
this and have it work as you expect:</p>
<ul>
<li>how convenient it is</li>
<li>that I can use an indented list
<ul>
<li>and still have it do the right thing</li>
</ul>
</li>
</ul>
<p dir="auto">That's all.</p>
<p dir="auto">Wait! I lied. Dedent can also be used as a function.<br />
&lt;/code&gt;&lt;/pre&gt;</p>
<p dir="auto">&lt;h3&gt;License&lt;/h3&gt;</p>
<p dir="auto">&lt;p&gt;MIT&lt;/p&gt;</p>
<p dir="auto">&lt;hr&gt;</p>
<p dir="auto">&lt;p&gt;本文由模极社发布&lt;/p&gt;</p>
<p dir="auto">&lt;h4&gt;<img src="https://forum.mj7.cn/assets/plugins/nodebb-plugin-emoji/emoji/android/1f4cb.png?v=k0o2a4s5i30" class="not-responsive emoji emoji-android emoji--clipboard" title=":clipboard:" alt="📋" /> 内容概览&lt;/h4&gt;</p>
<p dir="auto">&lt;table&gt;<br />
&lt;tr&gt;&lt;td&gt;分类&lt;/td&gt;&lt;td&gt;要点&lt;/td&gt;&lt;td&gt;建议/说明&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;核心概念&lt;/td&gt;&lt;td&gt;Dedent&lt;/td&gt;&lt;td&gt;详见正文&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;操作步骤&lt;/td&gt;&lt;td&gt;Dedent&lt;/td&gt;&lt;td&gt;详见正文&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;注意事项&lt;/td&gt;&lt;td&gt;Dedent&lt;/td&gt;&lt;td&gt;详见正文&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;适用场景&lt;/td&gt;&lt;td&gt;Dedent&lt;/td&gt;&lt;td&gt;详见正文&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;常见问题&lt;/td&gt;&lt;td&gt;Dedent&lt;/td&gt;&lt;td&gt;详见正文&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;</p>
<p dir="auto">&lt;hr&gt;<br />
&lt;h4&gt;<img src="https://forum.mj7.cn/assets/plugins/nodebb-plugin-emoji/emoji/android/1f517.png?v=k0o2a4s5i30" class="not-responsive emoji emoji-android emoji--link" title=":link:" alt="🔗" /> 你可能还感兴趣&lt;/h4&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href="/t/3443/3443"&gt;中鑫模具城&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="/t/4299/4299"&gt;content-disposition&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="/t/4378/4378"&gt;jest-mock&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p dir="auto">&lt;hr&gt;<br />
&lt;p&gt;&lt;strong&gt;相关推荐：&lt;/strong&gt;&lt;/p&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href="<a href="https://www.mj7.cn/t/4836-4836" rel="nofollow ugc">https://www.mj7.cn/t/4836-4836</a>"&gt;北京模具产业 — 科技研发驱动型模具基地&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="<a href="https://www.mj7.cn/t/4835-4835" rel="nofollow ugc">https://www.mj7.cn/t/4835-4835</a>"&gt;上海模具产业 — 高端精密模具研发中心&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="<a href="https://www.mj7.cn/t/4834-4834" rel="nofollow ugc">https://www.mj7.cn/t/4834-4834</a>"&gt;产业集群与模具产业发展的关系&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p dir="auto">&lt;hr&gt;<br />
&lt;p&gt;有没有同行遇到过同样的问题？分享一下经验。&lt;/p&gt;</p>
]]></description><link>https://forum.mj7.cn/topic/7196/dedent-模具行业从业者必备知识手册</link><generator>RSS for Node</generator><lastBuildDate>Fri, 02 Oct 2026 10:19:13 GMT</lastBuildDate><atom:link href="https://forum.mj7.cn/topic/7196.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 Apr 2026 21:52:23 GMT</pubDate><ttl>60</ttl></channel></rss>