Class: SafeObjectTransformer
Object transformer safely transforms an object by removing all the methods (except toString), private properties and based on the given parameters.
Implements
Constructors
constructor
• new SafeObjectTransformer(obj)
Parameters
| Name | Type |
|---|---|
obj | string | Record (opens in a new tab)<string, unknown> |
Properties
obj
• Private Readonly obj: Record (opens in a new tab)<string, unknown>
Methods
makeObject
▸ Private makeObject(obj): Record (opens in a new tab)<string, unknown>
Parameters
| Name | Type |
|---|---|
obj | string | Record (opens in a new tab)<string, unknown> |
Returns
Record (opens in a new tab)<string, unknown>
transform
▸ transform(tag): null | string
Transforms the given tag.
Parameters
| Name | Type | Description |
|---|---|---|
tag | Lexer | The tag that triggered the transformer. |
Returns
null | string