Last updated 2 years ago
Attribute.prototype.toObject()
Returns attribute primitive value converted to the object where the property key is the attribute name, and property value is the attribute value.
The return value is the attribute of a read-only object.
public toObject(): Readonly<{ [key in Name]: Value }> { return Object.freeze({ [this.#name]: this.#value, }) as { [key in Name]: Value }; }
// Example usage. import { Attribute } from '@angular-package/tag';