> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/js/module/package.md).

# package

[JS](/web/js.md) ⟩ [module](/web/js/module.md) ⟩ package

{% hint style="success" %}
a chunk of code that can be distributed (copied and installed).&#x20;

* [NPM](https://www.npmjs.com/) is a repository of JavaScript <mark style="color:purple;">**packages**</mark>.
  {% endhint %}

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="info" %}
A <mark style="color:purple;">**package**</mark> may contain <mark style="color:yellow;">**one or**</mark>**&#x20;**<mark style="color:red;">**more**</mark>**&#x20;**<mark style="color:yellow;">**modules**</mark> and has information about which other packages (its <mark style="color:yellow;">**dependencies**</mark>) it depends on. &#x20;
{% endhint %}

{% hint style="info" %}
[NPM](https://www.npmjs.com/) <mark style="color:purple;">**packages**</mark> or the code that runs on a web page may have gone through <mark style="color:yellow;">**multiple stages of transformation**</mark> — converted from modern JavaScript to historic JavaScript, from [**ES module**](/web/js/module/es.md) format to [**CommonJS**](/web/js/module/commonjs.md), [**bundled**](/web/js/val/builtin/proxy/handler-method.md), and [**minified**](/web/js/module/minifier.md).
{% endhint %}
{% endtab %}

{% tab title="📗 參考" %}

* [ ] Eloquent JS ⟩ [Packages](https://eloquentjavascript.net/10_modules.html#h_CpmQEv+4ez), [Building & Bundling](https://eloquentjavascript.net/10_modules.html#h_zWTXAU93DC)
  {% endtab %}

{% tab title="🛠 工具" %}

* [npm](https://www.npmjs.com/) - Node Package Manager
  {% endtab %}
  {% endtabs %}
