Tag
PackagesTwitterGitHub
  • Introduction
  • General concepts
  • Getting started
    • Skeleton
    • Installation
    • Public API
  • Attribute
    • Code
    • Attribute {}
    • Generic type variables
    • ★ Attribute() constructor
    • Instance
      • Accessors
        • attribute
        • name
        • value
        • [Symbol.toStringTag]
      • Properties
        • #name
        • #value
      • Methods
        • toArray()
        • toObject()
        • toString()
        • valueOf()
    • Static
      • Methods
        • isAttribute()
    • Usage
  • Attributes
    • Attributes {}
    • Generic type variables
    • Instance
      • Accessors
      • Properties
    • Attributes() constructor
    • Instance methods
    • Usage
  • Tag
    • Tag {}
    • Usage
  • Tag Extension
    • TagExtension {}
    • Usage
  • tags
    • Tags {}
    • Usage
  • BBCode
    • BBCode {}
    • Usage
  • Html
    • HTML {}
    • Usage
  • Variable
    • Variable {}
    • Usage
  • Variables
    • Variables {}
    • Usage
  • Types
    • ClosingTag
    • OpeningTag
    • TaggedText
  • License
    • MIT
  • Contact
    • ⋯ Chat
    • @ Email
  • Donate
    • ฿ Cryptocurrency
    • $ Fiat
Powered by GitBook
On this page
  • Attribute.prototype.toArray()
  • Returns
  • Example usage

Was this helpful?

Edit on GitHub
  1. Attribute
  2. Instance
  3. Methods

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';

PreviousMethodsNexttoObject()

Last updated 3 years ago

Was this helpful?