Module: tagscript
Enumerations
Classes
- BaseParser
- BreakParser
- Context
- DefineParser
- FiftyFiftyParser
- FunctionTransformer
- IfStatementParser
- IncludesParser
- IntegerTransformer
- Interpreter
- IntersectionStatementParser
- JSONVarParser
- Lexer
- LooseVarsParser
- Node
- OrdinalFormatParser
- RandomParser
- RangeParser
- ReplaceParser
- Response
- SafeObjectTransformer
- SliceParser
- StopParser
- StrictVarsParser
- StringFormatParser
- StringTransformer
- UnionStatementParser
- UrlDecodeParser
- UrlEncodeParser
Interfaces
Type Aliases
Awaitable
Ƭ Awaitable<T
>: PromiseLike
<T
> | T
Represents a type that may or may not be a promise
Type parameters
Name | Description |
---|---|
T | The type of the value |
Defined in
lib/Utils/Util.ts:6
TransformerFunction
Ƭ TransformerFunction: (tag
: Lexer
) => string
Type declaration
▸ (tag
): string
Parameters
Name | Type |
---|---|
tag | Lexer |
Returns
string
Defined in
lib/Transformer/Function.ts:4
Variables
escapeRegex
• Const
escapeRegex: RegExp
(opens in a new tab)
Defined in
lib/Utils/Util.ts:9
splitRegex
• Const
splitRegex: RegExp
(opens in a new tab)
Defined in
lib/Utils/Util.ts:8
Functions
asyncFilter
▸ asyncFilter<T
>(values
, fn
): Promise
(opens in a new tab)<T
[]>
Identical to Array.filter() (opens in a new tab) but works with async filter functions.
Type parameters
Name | Description |
---|---|
T | The type of the values |
Parameters
Name | Type | Description |
---|---|---|
values | T [] | The array of values |
fn | (t : T ) => Awaitable <boolean > | The filter function |
Returns
Promise
(opens in a new tab)<T
[]>
Defined in
lib/Utils/Util.ts:20
escapeContent
▸ escapeContent(content
): string
Escapes special tagscript syntax in a string.
Parameters
Name | Type | Description |
---|---|---|
content | string | The content to escape |
Returns
string
Defined in
lib/Utils/Util.ts:33
implicitBool
▸ implicitBool(str
): null
| boolean
Checks if the given value is 'true'
or 'false'
. If it is, it returns the boolean value. Otherwise, it returns null
Parameters
Name | Type | Description |
---|---|---|
str | string | The string to check |
Returns
null
| boolean
Defined in
lib/Utils/Util.ts:42
parseIf
▸ parseIf(str
): boolean
Parses an if statement. Returns a value based on the conditions.
Parameters
Name | Type | Description |
---|---|---|
str | string | The string to parse |
Returns
boolean
Defined in
lib/Utils/Util.ts:58
parseListIf
▸ parseListIf(str
): boolean
[]
Parses multiple if statements from a string.
Parameters
Name | Type | Description |
---|---|---|
str | string | The string to parse |
Returns
boolean
[]
Defined in
lib/Utils/Util.ts:118
split
▸ split(str
, extended?
): string
[]
Split a string by |
, but ignore escaped characters.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
str | string | undefined | The string to split |
extended | boolean | false | allow ~ or , as separators |
Returns
string
[]
Remarks
If extended if true, it will also split by ~
and ,
Defined in
lib/Utils/Util.ts:104