toArray()

Attribute.prototype.toArray()

Returns attribute primitive value converted to the array where the first element is the name, and the second is the value.

attribute.class.ts
public toArray(): readonly [Name, Value] {
  return [this.#name, this.#value];
}

Returns

The return value is the attribute of a read-only array.

Example usage

// Example usage.
import { Attribute } from '@angular-package/tag';

Last updated