ResourceName

Constructor

new ResourceName(raw)

The ResourceName class; it is a discrete type describing a command name. It is made out of two parts: the domain and the actual name. Its syntax is the following: domain:name. Any ResourceName not following this syntax will not be recognized. This type can quickly be shifted into its string form

raw

The raw version of the ResourceName; if it is a ResourceName, it will be parsed down to a string beforehand

{String}
arrow_forward
No value returned
Example
  •           let name = new kimiko.ResourceName("josh:help");
    
    console.log(name.domain); // "josh"
    console.log(name.name); // "help"
    
    console.log(name); // "josh:help"
    console.log(name == "josh:help"); // true
    console.log(name.equals("josh:help")); // true
    
    let name2 = new kimiko.ResourceName(name);
    console.log(name == name2); // true
    console.log(name.equals(name2)); // true
            

Methods

  • equals(raw) → {boolean}

    Returns whether or not the current ResourceName instance is equal to raw

    raw
    {String}
    arrow_forward
    {boolean}
  • toString() → {String}

    Converts the ResourceName to a String; it is also used by Symbol.toPrimitive and toJSON

    No arguments
    arrow_forward

    The parsed ResourceName, in the domain:name form

    {String}
` : '' ?>