# @stamp/named (DEPRECATED)

{% hint style="info" %}
This stamp (aka behaviour) is built into the stampit since `stampit@4.2.0` and `@stamp/it@1.1`.&#x20;
{% endhint %}

## @stamp/named (DEPRECATED)

*Changes the* `Stamp.name` *property using the* [*new ES6 feature*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name)*.*

Supported platforms: node>=4, iOS>=10, Edge, FF, Chrome, Safari

If used in a non-supported environment (node \<v4, or IE any version) then nothing will throw. But the `Stamp.name` will always be `"Stamp"`.

## Example

Default behaviour (without this stamp):

```javascript
const MyRegularStamp = compose(...);
console.log(MyRegularStamp.name); // 'Stamp'
```

New behaviour:

```javascript
import Named from '@stamp/named';

const MyNamedStamp = MyRegularStamp.compose(Named).setName('MyNamedStamp');
```

Or if you don't want to import the stamp you can import only the method:

```javascript
import {setName} from '@stamp/named';
const MyNamedStamp = MyRegularStamp.compose(setName('MyNamedStamp'));
```

Then stamp receives a different name instead of the default "Stamp":

```javascript
console.log(MyNamedStamp.name); // 'MyNamedStamp'
```

Derived stamps behaviour:

```javascript
// All derived stamps will also be named 'MyNamedStamp' until changed:
let Stamp2 = compose(..., MyNamedStamp, ...);
console.log(Stamp2.name); // WARNING! Still 'MyNamedStamp' !!!

// Overwriting the name
Stamp2 = Stamp2.setName('Stamp2');
console.log(Stamp2.name); // 'Stamp2' :)
```


---

# Agent Instructions: 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://stampit.js.org/ecosystem/stamp-named.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.
