classes.common.AliasedName.AliasedName()

Represents a name, with aliases, or nicknames, and can be stored as keys in an classes.common.AliasedName.AliasedNameStore.

Methods

static create(name) → {classes.common.AliasedName.AliasedName}

Allows creation of AliasedName by both direct string of an object of options
Parameters:
Name Type Description
name string | classes.common.AliasedName.AliasedName The name
Returns:
classes.common.AliasedName.AliasedName - A newly created AliasedName

__init__(name, opts, public_cache) → {classes.common.AliasedName.AliasedName}

Initializes an AliasedName
Parameters:
Name Type Description
name string | Buffer The original name.
opts Object Options for this AliasedName.
public_cache Array Currently unused elsewhere, pending removal.
Returns:
classes.common.AliasedName.AliasedName - A newly created AliasedName
Implements:

aka() → {string}

Returns a human readable format of this AliasedName if possible. #AKA and #aka are identical.
Throws:
When grammarJoin is not loaded as a dependency, the object cannot generate an AKA.
Type
Error
Returns:
string - The aka string.
See:
  • functions.grammarJoin

AKA() → {string}

Returns a human readable format of this AliasedName if possible. #AKA and #aka are identical.
Throws:
When grammarJoin is not loaded as a dependency, the object cannot generate an AKA.
Type
Error
Returns:
string - The aka string.
See:
  • functions.grammarJoin

alias() → {string}

Sets a new alias, converting as appropriate to Buffer.
Returns:
string - The name unicode string.
See:
  • classes.common.AliasedName#aliases

dealias() → {string}

Deletes an alias.
Returns:
string - The name unicode string.
See:
  • classes.common.AliasedName#aliases

for_each_store(callback) → {undefined}

Calls a callback function for every saved storage object. This is essentially Array#forEach.
Parameters:
Name Type Description
callback function Accepts (store, i, stores) arguments called for every saved storage object.
Returns:
undefined
See:

for_every_alias(callback) → {undefined}

Calls a callback function for every alias of this AliasedName. This is essentially Array#every.
Parameters:
Name Type Description
callback function Accepts (alias, i, aliases) arguments called for every alias.
Returns:
undefined
See:
Saves a circular reference to a larger storage object. Useful for looping through various references of this AliasedName in stores.
Parameters:
Name Type Description
store classes.common.AliasedName.AliasedNameStore | interfaces.IDCreatable This storage object.
Returns:
classes.common.AliasedName.AliasedNameStore | interfaces.IDCreatable - The now saved storage object.
See:

rename() → {string}

Sets a new name, converting as appropriate to Buffer.
Returns:
string - The name unicode string.
See:
  • classes.common.AliasedName#name

toString() → {string}

Default toString() that returns the unicode format of the name property.
Returns:
string - The name unicodde string.
See:
  • classes.common.AliasedName#name

package, inner DefaultExports(deps) → {classes.common.AliasedName.AliasedName}

Generates an AliasedName class. Called internally within the AliasedName sub-folder assembly.
Parameters:
Name Type Description
deps Object Dependencies of the AliasedName
Properties
Name Type Description
DepsCreatable interfaces.DepsCreatable The interface that AliasedName extends from. We use DepsCreatable instead of IDCreatable because names do not have ids attached to them. Logically speaking, many users and domains can have the same name; as long as their userids are different, there does not need to be an id-based distinction when it comes to their names. Conflicts around naming should be resolved by the users themselves and not forced upon by the model.
TrackingSet classes.common.TrackingSet Used to store AliasedName aliases.
Returns:
classes.common.AliasedName.AliasedName - The AliasedName class