Condividi tramite


InternalFunctionUtils class

Funzioni di utilità usate solo interne

Proprietà

MillisecondToTickConstant

Costante da convertire tra tick e ms.

UnixMilliSecondToTicksConstant

Costante per la conversione del timestamp unix in tick.

Metodi

accessIndex(any, number)

Ricerca di una stringa o di un indice numerico di un oggetto.

accessProperty(any, string)

Ricerca di una proprietà in Mappa o Oggetto.

commonStringify(unknown)

Stringify comune un oggetto .

convertToList(unknown)

Convertire un oggetto in matrice. Se l'istanza è matrice, restituisce se stessa. Se l'istanza è oggetto, restituire l'elenco di coppie {key, value}. Else restituisce undefined.

foreach(Expression, MemoryInterface, Options)

Analizzatore per foreach e selezionare le funzioni.

getTextDecoder(string)

Funzione helper TextDecoder.

getTextEncoder()

Funzione helper TextEncoder.

isLogicTrue(any)

Risultato del test per verificare se True nelle funzioni di confronto logiche.

lambdaEvaluator<T, U>(Expression, MemoryInterface, Options, T[], (currentItem: T, result: U, error: string) => boolean)

Analizzatore lambda.

parseStringOrUndefined(string | undefined)

Eseguire il wrapping di stringhe o non definiti in stringa. Il valore predefinito è una stringa vuota.

parseTimexProperty(any)

Analizzare la funcizione timex.

parseUri(string)

Analizzare la stringa nell'oggetto URL.

sortBy(boolean)

Funzione helper sort.

ticks(string)

Convertire un input stringa in numeri di graduazione.

timeUnitTransformer(number, string)

Trasformare il periodo C# e l'unità in un punto e un'unità js.

ValidateLambdaExpression(Expression)

Validator per foreach, selezionare e dove funzioni.

verifyISOTimestamp(any)

Verificare che una stringa di timestamp sia un formato timestamp ISO valido.

verifyTimestamp(any)

Verificare che una stringa di timestamp sia un formato timestamp valido.

wrapGetValue(MemoryInterface, string, Options)

Ottenere il valore di un percorso da una memoria.

Dettagli proprietà

MillisecondToTickConstant

Costante da convertire tra tick e ms.

static MillisecondToTickConstant: BigInteger = bigInt('10000')

Valore della proprietà

BigInteger

UnixMilliSecondToTicksConstant

Costante per la conversione del timestamp unix in tick.

static UnixMilliSecondToTicksConstant: BigInteger = bigInt('621355968000000000')

Valore della proprietà

BigInteger

Dettagli metodo

accessIndex(any, number)

Ricerca di una stringa o di un indice numerico di un oggetto.

static function accessIndex(instance: any, index: number): ValueWithError

Parametri

instance

any

Istanza con proprietà .

index

number

Proprietà da cercare.

Restituisce

Informazioni sul valore e sull'errore, se presenti.

accessProperty(any, string)

Ricerca di una proprietà in Mappa o Oggetto.

static function accessProperty(instance: any, property: string): ValueWithError

Parametri

instance

any

Istanza con proprietà .

property

string

Proprietà da cercare.

Restituisce

Informazioni sul valore e sull'errore, se presenti.

commonStringify(unknown)

Stringify comune un oggetto .

static function commonStringify(input: unknown): string

Parametri

input

unknown

oggetto di input.

Restituisce

string

oggetto stringato.

convertToList(unknown)

Convertire un oggetto in matrice. Se l'istanza è matrice, restituisce se stessa. Se l'istanza è oggetto, restituire l'elenco di coppie {key, value}. Else restituisce undefined.

static function convertToList(instance: unknown): unknown[] | undefined

Parametri

instance

unknown

Istanza di input.

Restituisce

unknown[] | undefined

Elenco generato.

foreach(Expression, MemoryInterface, Options)

Analizzatore per foreach e selezionare le funzioni.

static function foreach(expression: Expression, state: MemoryInterface, options: Options): ValueWithError

Parametri

expression
Expression

Espressione.

state
MemoryInterface

Ambito della memoria.

options
Options

Opzioni.

Restituisce

Elenco valutato.

getTextDecoder(string)

Funzione helper TextDecoder.

static function getTextDecoder(code: string): TextDecoder

Parametri

code

string

Formato di codifica.

Restituisce

TextDecoder

Decodificatore di testo.

getTextEncoder()

Funzione helper TextEncoder.

static function getTextEncoder(): TextEncoder

Restituisce

TextEncoder

Codificatore di testo.

isLogicTrue(any)

Risultato del test per verificare se True nelle funzioni di confronto logiche.

static function isLogicTrue(instance: any): boolean

Parametri

instance

any

Valore calcolato.

Restituisce

boolean

True se booleano true o non Null.

lambdaEvaluator<T, U>(Expression, MemoryInterface, Options, T[], (currentItem: T, result: U, error: string) => boolean)

Analizzatore lambda.

static function lambdaEvaluator<T, U>(expression: Expression, state: MemoryInterface, options: Options, list: T[], callback: (currentItem: T, result: U, error: string) => boolean)

Parametri

expression
Expression

espressione.

state
MemoryInterface

stato di memoria.

options
Options

Opzioni.

list

T[]

elenco di elementi.

callback

(currentItem: T, result: U, error: string) => boolean

Richiamare. restituire il flag di interruzione.

parseStringOrUndefined(string | undefined)

Eseguire il wrapping di stringhe o non definiti in stringa. Il valore predefinito è una stringa vuota.

static function parseStringOrUndefined(input: string | undefined): string

Parametri

input

string | undefined

Stringa di input

Restituisce

string

Stringa di cui è stato eseguito il wrapping.

parseTimexProperty(any)

Analizzare la funcizione timex.

static function parseTimexProperty(timexExpr: any): { error: string, timexProperty: TimexProperty }

Parametri

timexExpr

any

Input Stringa o TimexProperty.

Restituisce

{ error: string, timexProperty: TimexProperty }

TimexProperty ed errore.

parseUri(string)

Analizzare la stringa nell'oggetto URL.

static function parseUri(uri: string): ValueWithError

Parametri

uri

string

URI stringa di input.

Restituisce

Oggetto URL analizzato.

sortBy(boolean)

Funzione helper sort.

static function sortBy(isDescending: boolean): EvaluateExpressionDelegate

Parametri

isDescending

boolean

Flag decrescente.

Restituisce

Matrice ordinata.

ticks(string)

Convertire un input stringa in numeri di graduazione.

static function ticks(timeStamp: string): ValueWithError

Parametri

timeStamp

string

Input timestamp stringa.

Restituisce

Stringa convertita in tick.

timeUnitTransformer(number, string)

Trasformare il periodo C# e l'unità in un punto e un'unità js.

static function timeUnitTransformer(duration: number, cSharpStr: string): { duration: number, tsStr: OpUnitType }

Parametri

duration

number

Durata C#.

cSharpStr

string

Unità C#.

Restituisce

{ duration: number, tsStr: OpUnitType }

TimeUnit trasformato.

ValidateLambdaExpression(Expression)

Validator per foreach, selezionare e dove funzioni.

static function ValidateLambdaExpression(expression: Expression)

Parametri

expression
Expression

Espressione da convalidare.

verifyISOTimestamp(any)

Verificare che una stringa di timestamp sia un formato timestamp ISO valido.

static function verifyISOTimestamp(value: any): string | undefined

Parametri

value

any

Stringa di timestamp da controllare.

Restituisce

string | undefined

Errore o non definito se non valido.

verifyTimestamp(any)

Verificare che una stringa di timestamp sia un formato timestamp valido.

static function verifyTimestamp(value: any): string | undefined

Parametri

value

any

Stringa di timestamp da controllare.

Restituisce

string | undefined

Errore o non definito se non valido.

wrapGetValue(MemoryInterface, string, Options)

Ottenere il valore di un percorso da una memoria.

static function wrapGetValue(state: MemoryInterface, path: string, options: Options): any

Parametri

state
MemoryInterface

Memoria.

path

string

Stringa di percorso.

options
Options

Opzioni.

Restituisce

any

Valore di un percorso da una memoria.