> 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lochiwei.gitbook.io/web/js/module/package.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
