Namespace: attributes

gpf. attributes

Root namespace for GPF attributes

Since:
  • 0.2.4

Classes

Attribute
AttributeForInstanceOf
ClassAttribute
MemberAttribute
Serializable
UniqueAttribute

Methods


<static> decorator(attribute)

Bridge ES6 decorators with attributes

Parameters:
Name Type Argument Description
attribute gpf.attributes.Attribute <repeatable>

Attributes to add

Since:
  • 0.2.9
Throws:
Returns:

decorator function

Type
function

<static> get(objectOrClass [, baseAttributeClass])

Get attributes defined for the object / class

Parameters:
Name Type Argument Description
objectOrClass Object | function

Object instance or class constructor

baseAttributeClass gpf.attributes.Attribute <optional>

Base attribute class used to filter results

Since:
  • 0.2.4
Throws:
Returns:

Dictionary of attributes grouped per members, the special member $attributes is used for attributes set at the class level.

Type
Object