MCPcopy Index your code
hub / github.com/nodejs/node / constructor

Method constructor

lib/internal/async_local_storage/async_hooks.js:48–59  ·  view source on GitHub ↗

* @param {AsyncLocalStorageOptions} [options]

(options = kEmptyObject)

Source from the content-addressed store, hash-verified

46 * @param {AsyncLocalStorageOptions} [options]
47 */
48 constructor(options = kEmptyObject) {
49 this.kResourceStore = Symbol('kResourceStore');
50 this.enabled = false;
51 validateObject(options, 'options');
52 this.#defaultValue = options.defaultValue;
53
54 if (options.name !== undefined) {
55 this.#name = `${options.name}`;
56 }
57
58 this._enable();
59 }
60
61 /** @type {string} */
62 get name() { return this.#name || ''; }

Callers

nothing calls this directly

Calls 2

_enableMethod · 0.95
SymbolFunction · 0.50

Tested by

no test coverage detected