# es-set-tostringtag

[![github actions](https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/es-set-tostringtag)](https://github.com/es-shims/es-set-tostringtag/actions) [![coverage](https://codecov.io/gh/es-shims/es-set-tostringtag/branch/main/graphs/badge.svg)](https://app.codecov.io/gh/es-shims/es-set-tostringtag/) [![License](https://img.shields.io/npm/l/es-set-tostringtag.svg)](https://github.com/jcarbonnell/nova/blob/main/use-cases/node_modules/es-set-tostringtag/LICENSE/README.md) [![Downloads](https://img.shields.io/npm/dm/es-set-tostringtag.svg)](https://npm-stat.com/charts.html?package=es-set-tostringtag)

[![npm badge](https://nodei.co/npm/es-set-tostringtag.png?downloads=true\&stars=true)](https://npmjs.com/package/es-set-tostringtag)

A helper to optimistically set Symbol.toStringTag, when possible.

## Example

Most common usage:

```js
var assert = require('assert');
var setToStringTag = require('es-set-tostringtag');

var obj = {};

assert.equal(Object.prototype.toString.call(obj), '[object Object]');

setToStringTag(obj, 'tagged!');

assert.equal(Object.prototype.toString.call(obj), '[object tagged!]');
```

## Options

An optional options argument can be provided as the third argument. The available options are:

### `force`

If the `force` option is set to `true`, the toStringTag will be set even if it is already set.

### `nonConfigurable`

If the `nonConfigurable` option is set to `true`, the toStringTag will be defined as non-configurable when possible.

## Tests

Simply clone the repo, `npm install`, and run `npm test`


---

# 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://civictech-ou.gitbook.io/nova-docs/use-cases/node_modules/es-set-tostringtag.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.
